Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

Source commit:
python/typeshed@9abe56a

@AlexWaygood
Copy link
Member

needs #13093 reapplied :-)

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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]

@hauntsaninja
Copy link
Collaborator Author

hauntsaninja commented Sep 26, 2022

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.

@hauntsaninja hauntsaninja merged commit ffd78df into python:master Sep 26, 2022
@hauntsaninja hauntsaninja deleted the sync branch September 26, 2022 19:14
@hauntsaninja
Copy link
Collaborator Author

hauntsaninja commented Sep 26, 2022

#13743 to remove LiteralString

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.

2 participants