-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Sync typeshed #12982
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 #12982
Conversation
Source commit: python/typeshed@91d6383
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: boostedblob (https://github.com/hauntsaninja/boostedblob)
+ boostedblob/cli.py:29: error: Argument 1 to "run" has incompatible type "Awaitable[T]"; expected "Coroutine[Any, Any, <nothing>]"
anyio (https://github.com/agronholm/anyio)
+ src/anyio/_backends/_asyncio.py:89: error: Unused "type: ignore" comment
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/logging.py:80: error: Unused "type: ignore" comment
+ sphinx/util/logging.py:434: error: Unused "type: ignore" comment
werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/debug/repr.py:134: error: Unused "type: ignore" comment
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]
manticore (https://github.com/trailofbits/manticore)
+ manticore/core/workspace.py:220: error: Argument 1 to "exists" has incompatible type "Optional[str]"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int]"
+ manticore/core/workspace.py:221: error: Argument 1 to "isdir" has incompatible type "Optional[str]"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int]"
+ manticore/core/workspace.py:223: error: Argument 1 to "mkdir" has incompatible type "Optional[str]"; expected "Union[str, bytes, PathLike[str], PathLike[bytes]]"
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]
core (https://github.com/home-assistant/core)
+ homeassistant/components/sonos/media.py:180: error: List item 0 has incompatible type "Optional[str]"; expected "None" [list-item]
streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/legacy_caching/hashing_test.py:253:30: error: Unsupported operand types for + ("str" and "int") [operator]
+ lib/tests/streamlit/legacy_caching/hashing_test.py:253:24: error: No overload variant of "__add__" of "str" matches argument type "int" [operator]
+ lib/tests/streamlit/legacy_caching/hashing_test.py:253:24: note: Possible overload variants:
+ lib/tests/streamlit/legacy_caching/hashing_test.py:253:24: note: def __add__(self, str) -> str
optuna (https://github.com/optuna/optuna)
+ tests/samplers_tests/tpe_tests/test_sampler.py:1116: error: Incompatible types in assignment (expression has type "DictProxy[Any, Any]", variable has type "Dict[int, List[int]]")
+ tests/samplers_tests/tpe_tests/test_sampler.py:1117: error: Incompatible types in assignment (expression has type "DictProxy[Any, Any]", variable has type "Dict[int, int]")
|
@hauntsaninja We want to use this sync for internal mypy release. Could you please check the output of |
The ones in aiohttp / homeassistant (core) are false positives: boostedblob change looks intentional: manticore is also a false positive, but hard to fix: streamlit is just a change in diagnostics The one in optuna is intentional (although not sure that I'd have made the same change): |
Since we don't have proper support for LiteralString, python/typeshed#7725 doesn't get us anything. If it's blocking a release, you could temporarily revert that in our vendored copy. Here are minimal reproducers:
Probably change is breaking type context |
FYI you might want to cherry-pick python/typeshed#8137 after merging this, since this sync contains the following regression: python/typeshed#8136. |
I am going to merge this PR as is, and will separately fix small issues/regressions in separate PRs. |
* Sync typeshed Source commit: python/typeshed@91d6383 * fix tests Co-authored-by: hauntsaninja <>
Source commit:
python/typeshed@91d6383