Experiment: What happens when we only convert mutablemapping.pop keys to object?#15304
Closed
randolf-scholz wants to merge 1 commit intopython:mainfrom
Closed
Experiment: What happens when we only convert mutablemapping.pop keys to object?#15304randolf-scholz wants to merge 1 commit intopython:mainfrom
randolf-scholz wants to merge 1 commit intopython:mainfrom
Conversation
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: bidict (https://github.com/jab/bidict)
+ bidict/_bidict.py: note: In member "pop" of class "MutableBidict":
+ bidict/_bidict.py:122:6: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ bidict/_bidict.py:122:6: note: Superclass:
+ bidict/_bidict.py:122:6: note: @overload
+ bidict/_bidict.py:122:6: note: def pop(self, object, /) -> VT
+ bidict/_bidict.py:122:6: note: @overload
+ bidict/_bidict.py:122:6: note: def pop(self, object, VT, /) -> VT
+ bidict/_bidict.py:122:6: note: @overload
+ bidict/_bidict.py:122:6: note: def [_T] pop(self, object, _T, /) -> VT | _T
+ bidict/_bidict.py:122:6: note: Subclass:
+ bidict/_bidict.py:122:6: note: @overload
+ bidict/_bidict.py:122:6: note: def pop(self, KT, /) -> VT
+ bidict/_bidict.py:122:6: note: @overload
+ bidict/_bidict.py:122:6: note: def [DT] pop(self, KT, DT = ..., /) -> VT | DT
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ bson/son.py:126: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ bson/son.py:126: note: Superclass:
+ bson/son.py:126: note: @overload
+ bson/son.py:126: note: def pop(self, object, /) -> _Value
+ bson/son.py:126: note: @overload
+ bson/son.py:126: note: def pop(self, object, _Value, /) -> _Value
+ bson/son.py:126: note: @overload
+ bson/son.py:126: note: def [_T] pop(self, object, _T, /) -> _Value | _T
+ bson/son.py:126: note: Subclass:
+ bson/son.py:126: note: def [_T] pop(self, key: _Key, *args: _Value | _T) -> _Value | _T
+ pymongo/common.py:1045: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ pymongo/common.py:1045: note: Superclass:
+ pymongo/common.py:1045: note: @overload
+ pymongo/common.py:1045: note: def pop(self, object, /) -> Any
+ pymongo/common.py:1045: note: @overload
+ pymongo/common.py:1045: note: def pop(self, object, Any, /) -> Any
+ pymongo/common.py:1045: note: @overload
+ pymongo/common.py:1045: note: def [_T] pop(self, object, _T, /) -> Any | _T
+ pymongo/common.py:1045: note: Subclass:
+ pymongo/common.py:1045: note: def pop(self, key: str, *args: Any, **kwargs: Any) -> Any
pyodide (https://github.com/pyodide/pyodide)
+ src/py/_pyodide/_core_docs.py:1151: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ src/py/_pyodide/_core_docs.py:1151: note: Superclass:
+ src/py/_pyodide/_core_docs.py:1151: note: @overload
+ src/py/_pyodide/_core_docs.py:1151: note: def pop(self, object, /) -> VT
+ src/py/_pyodide/_core_docs.py:1151: note: @overload
+ src/py/_pyodide/_core_docs.py:1151: note: def pop(self, object, VT, /) -> VT
+ src/py/_pyodide/_core_docs.py:1151: note: @overload
+ src/py/_pyodide/_core_docs.py:1151: note: def [_T] pop(self, object, _T, /) -> VT | _T
+ src/py/_pyodide/_core_docs.py:1151: note: Subclass:
+ src/py/_pyodide/_core_docs.py:1151: note: @overload
+ src/py/_pyodide/_core_docs.py:1151: note: def pop(self, KT, /) -> VT
+ src/py/_pyodide/_core_docs.py:1151: note: @overload
+ src/py/_pyodide/_core_docs.py:1151: note: def [T] pop(self, KT, VT | T = ..., /) -> VT | T
django-stubs (https://github.com/typeddjango/django-stubs)
+ django-stubs/http/request.pyi:202: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ django-stubs/http/request.pyi:202: note: Superclass:
+ django-stubs/http/request.pyi:202: note: @overload
+ django-stubs/http/request.pyi:202: note: def pop(self, object, /) -> str
+ django-stubs/http/request.pyi:202: note: @overload
+ django-stubs/http/request.pyi:202: note: def pop(self, object, str, /) -> str
+ django-stubs/http/request.pyi:202: note: @overload
+ django-stubs/http/request.pyi:202: note: def [_T] pop(self, object, _T, /) -> str | _T
+ django-stubs/http/request.pyi:202: note: Subclass:
+ django-stubs/http/request.pyi:202: note: @overload
+ django-stubs/http/request.pyi:202: note: def pop(self, str | bytes, /) -> Never
+ django-stubs/http/request.pyi:202: note: @overload
+ django-stubs/http/request.pyi:202: note: def [_Z] pop(self, str | bytes, str | _Z = ..., /) -> Never
scrapy (https://github.com/scrapy/scrapy)
+ scrapy/utils/datatypes.py:98: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ scrapy/utils/datatypes.py:98: note: Superclass:
+ scrapy/utils/datatypes.py:98: note: @overload
+ scrapy/utils/datatypes.py:98: note: def pop(self, object, /) -> Any
+ scrapy/utils/datatypes.py:98: note: @overload
+ scrapy/utils/datatypes.py:98: note: def pop(self, object, Any, /) -> Any
+ scrapy/utils/datatypes.py:98: note: @overload
+ scrapy/utils/datatypes.py:98: note: def [_T] pop(self, object, _T, /) -> Any | _T
+ scrapy/utils/datatypes.py:98: note: Subclass:
+ scrapy/utils/datatypes.py:98: note: def [AnyStr: (str, bytes)] pop(self, key: AnyStr, *args: Any) -> Any
+ scrapy/settings/__init__.py:629: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ scrapy/settings/__init__.py:629: note: Superclass:
+ scrapy/settings/__init__.py:629: note: @overload
+ scrapy/settings/__init__.py:629: note: def pop(self, object, /) -> Any
+ scrapy/settings/__init__.py:629: note: @overload
+ scrapy/settings/__init__.py:629: note: def pop(self, object, Any, /) -> Any
+ scrapy/settings/__init__.py:629: note: @overload
+ scrapy/settings/__init__.py:629: note: def [_T] pop(self, object, _T, /) -> Any | _T
+ scrapy/settings/__init__.py:629: note: Subclass:
+ scrapy/settings/__init__.py:629: note: def pop(self, name: bool | float | int | str | None, default: Any = ...) -> Any
steam.py (https://github.com/Gobot1234/steam.py)
+ steam/utils.py:559: error: Signature of "pop" incompatible with supertype "typing.MutableMapping" [override]
+ steam/utils.py:559: note: Superclass:
+ steam/utils.py:559: note: @overload
+ steam/utils.py:559: note: def pop(self, object, /) -> _VT
+ steam/utils.py:559: note: @overload
+ steam/utils.py:559: note: def pop(self, object, _VT, /) -> _VT
+ steam/utils.py:559: note: @overload
+ steam/utils.py:559: note: def [_T] pop(self, object, _T, /) -> _VT | _T
+ steam/utils.py:559: note: Subclass:
+ steam/utils.py:559: note: @overload
+ steam/utils.py:559: note: def pop(self, key: _KT) -> _VT
+ steam/utils.py:559: note: @overload
+ steam/utils.py:559: note: def [_T] pop(self, key: _KT, default: _VT | _T) -> _VT | _T
- steam/ext/commands/utils.py:52: note: def pop(self, str, /) -> _VT
+ steam/ext/commands/utils.py:52: note: def pop(self, object, /) -> _VT
- steam/ext/commands/utils.py:52: note: def pop(self, str, _VT, /) -> _VT
+ steam/ext/commands/utils.py:52: note: def pop(self, object, _VT, /) -> _VT
- steam/ext/commands/utils.py:52: note: def [_T] pop(self, str, _T, /) -> _VT | _T
+ steam/ext/commands/utils.py:52: note: def [_T] pop(self, object, _T, /) -> _VT | _T
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#15297 (comment)