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
Remove use of LiteralString in builtins #13743
Merged
Merged
Conversation
This file contains 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
Updated version of python#13093
Merged
|
Diff from mypy_primer, showing the effect of this PR on open source code: 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: 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
+ 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]"
streamlit (https://github.com/streamlit/streamlit)
- 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:30: error: Unsupported operand types for + ("str" and "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
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:177: error: List item 0 has incompatible type "Optional[str]"; expected "None" [list-item]
|
cdce8p
pushed a commit
to cdce8p/mypy
that referenced
this pull request
Oct 6, 2022
Merged
hauntsaninja
added a commit
that referenced
this pull request
Oct 7, 2022
Source commit: python/typeshed@8b41b13 Reapply #13743 to remove use of `LiteralString`. Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
hauntsaninja
added a commit
to hauntsaninja/mypy
that referenced
this pull request
Oct 8, 2022
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.
Updated version of #13093