-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Sync typeshed #13742
Sync typeshed #13742
Conversation
Source commit: python/typeshed@9abe56a
needs #13093 reapplied :-) |
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: operator (https://github.com/canonical/operator)
+ ops/testing.py:399: error: Incompatible types in assignment (expression has type "str", variable has type "Optional[Dict[Any, Any]]")
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/cmd/quickstart.py: note: In function "main":
+ sphinx/cmd/quickstart.py:554:16: error: Incompatible return value type (got "Union[str, int, None]", expected "int") [return-value]
porcupine (https://github.com/Akuli/porcupine)
+ porcupine/plugins/editorconfig.py:152: error: Argument 1 to "map" has incompatible type "Callable[[AnyStr], AnyStr]"; expected "Callable[[str], AnyStr]" [arg-type]
+ porcupine/plugins/pluginmanager.py:133: error: Argument 1 to "map" has incompatible type "Callable[[AnyStr], AnyStr]"; expected "Callable[[str], AnyStr]" [arg-type]
Expression (https://github.com/cognitedata/Expression)
- expression/extra/parser.py:302: error: Argument 1 to "map" has incompatible type "Callable[[_A], str]"; expected "Callable[[_A], _B]"
- expression/extra/parser.py:302: error: Incompatible return value type (got "str", expected "_B")
- expression/extra/parser.py:302: error: Argument 1 to "join" of "str" has incompatible type "_A"; expected "Iterable[str]"
+ expression/extra/parser.py:302: error: No overload variant of "join" of "str" matches argument type "_A"
+ expression/extra/parser.py:302: note: Possible overload variants:
+ expression/extra/parser.py:302: note: def join(self, Iterable[str], /) -> str
streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:257:30: error: Unsupported operand types for + ("str" and "int") [operator]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:257:24: error: No overload variant of "__add__" of "str" matches argument type "int" [operator]
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:257:24: note: Possible overload variants:
+ lib/tests/streamlit/runtime/legacy_caching/hashing_test.py:257:24: note: def __add__(self, str, /) -> str
pylint (https://github.com/pycqa/pylint)
+ pylint/config/argument.py:370: error: Incompatible types in assignment (expression has type "Type[pylint.config.callback_actions._ExtendAction]", variable has type "Type[argparse._ExtendAction]") [assignment]
+ pylint/config/argument.py:368: error: Unused "type: ignore" comment
mypy (https://github.com/python/mypy)
+ mypy/api.py:62: error: Incompatible types in assignment (expression has type "Union[str, int, None]", variable has type "int") [assignment]
cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/main.py: note: In function "main":
+ cwltool/main.py:1323:24: error: Incompatible return value type (got "Union[str, int, None]", expected "int") [return-value]
+ tests/util.py: note: In function "get_main_output":
+ tests/util.py:110:14: error: Incompatible types in assignment (expression has type "Union[str, int, None]", variable has type "int") [assignment]
core (https://github.com/home-assistant/core)
+ homeassistant/components/sonos/media.py:177: error: List item 0 has incompatible type "Optional[str]"; expected "None" [list-item]
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/multipart.py:95: error: Argument 1 to "map" has incompatible type "Callable[[AnyStr], AnyStr]"; expected "Callable[[str], AnyStr]" [arg-type]
|
cwltool, sphinx, mypy are from: python/typeshed#8554 pylint is from: python/typeshed#8701 Not sure what's causing the one in operator, but the error looks correct to me. porcupine, core, streamlit, aiohttp (and probably Expression) are from LiteralString. #13093 no longer applies cleanly, so I'll make those changes in a follow-up PR. |
#13743 to remove LiteralString |
Source commit:
python/typeshed@9abe56a