FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Sync typeshed by hauntsaninja · Pull Request #13742 · python/mypy · GitHub

Repository navigation

Sync typeshed - #13742

Merged
hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:sync
Sep 26, 2022
Merged

hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:sync

Conversation

Copy link
Copy Markdown
Collaborator

Source commit:
python/typeshed@9abe56a

Copy link
Copy Markdown
Member

needs #13093 reapplied :-)

This comment has been minimized.

Copy link
Copy Markdown
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 commented Sep 26, 2022 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

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 merged commit ffd78df into python:master Sep 26, 2022
hauntsaninja deleted the sync branch September 26, 2022 19:14

hauntsaninja commented Sep 26, 2022 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

#13743 to remove LiteralString

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL