Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHON-4297 Allow passing arbitrary index options to create_search_index #1561

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

ShaneHarvey
Copy link
Member

@@ -593,23 +593,28 @@ def __init__(
definition: Mapping[str, Any],
name: Optional[str] = None,
type: Optional[str] = "search",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to remove this default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll ask that question in mongodb/specifications#1541.

@ShaneHarvey
Copy link
Member Author

Updated to fix these typing failures:

pymongo/operations.py:591: error: Function is missing a type annotation for one
or more arguments  [no-untyped-def]
        def __init__(
        ^
pymongo/operations.py:615: error: Incompatible types in assignment (expression
has type "Mapping[str, Any]", target has type "str")  [assignment]
            self.__document["definition"] = definition
                                            ^
pymongo/operations.py:616: error: Incompatible types in assignment (expression
has type "Optional[str]", target has type "str")  [assignment]
            self.__document["type"] = type
                                      ^

@ShaneHarvey ShaneHarvey merged commit f757fe3 into mongodb:master Mar 26, 2024
73 of 75 checks passed
@ShaneHarvey ShaneHarvey deleted the PYTHON-4297 branch March 26, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants