Skip to content

Conversation

@ShaneHarvey
Copy link
Member

self,
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
@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