Skip to content

Remove use of LiteralString in builtins#13743

Merged
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:no-literal-string
Sep 26, 2022
Merged

Remove use of LiteralString in builtins#13743
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:no-literal-string

Conversation

@hauntsaninja

Copy link
Copy Markdown
Collaborator

Updated version of #13093

@hauntsaninja hauntsaninja mentioned this pull request Sep 26, 2022
@github-actions

Copy link
Copy Markdown
Contributor

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]
@hauntsaninja hauntsaninja merged commit 780534b into python:master Sep 26, 2022
@hauntsaninja hauntsaninja deleted the no-literal-string branch September 26, 2022 19:55
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request Oct 6, 2022
@cdce8p cdce8p mentioned this pull request Oct 7, 2022
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
github-actions Bot pushed a commit that referenced this pull request Oct 15, 2022
github-actions Bot pushed a commit that referenced this pull request Nov 1, 2022
github-actions Bot pushed a commit that referenced this pull request Nov 2, 2022
github-actions Bot pushed a commit that referenced this pull request Nov 15, 2022
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2022
github-actions Bot pushed a commit that referenced this pull request Dec 15, 2022
github-actions Bot pushed a commit that referenced this pull request Jan 1, 2023
github-actions Bot pushed a commit that referenced this pull request Jan 15, 2023
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Feb 3, 2023
koogoro pushed a commit to koogoro/mypy that referenced this pull request Feb 15, 2023
koogoro pushed a commit to koogoro/mypy that referenced this pull request Feb 17, 2023
koogoro pushed a commit to koogoro/mypy that referenced this pull request Feb 18, 2023
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Mar 1, 2023
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Mar 4, 2023
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Mar 15, 2023
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Apr 1, 2023
github-actions Bot pushed a commit that referenced this pull request Aug 15, 2023
koogoro pushed a commit to koogoro/mypy that referenced this pull request Aug 21, 2023
github-actions Bot pushed a commit that referenced this pull request Sep 1, 2023
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Sep 15, 2023
github-actions Bot pushed a commit that referenced this pull request Oct 1, 2023
github-actions Bot pushed a commit that referenced this pull request Oct 15, 2023
github-actions Bot pushed a commit that referenced this pull request Nov 1, 2023
github-actions Bot pushed a commit that referenced this pull request Nov 15, 2023
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Dec 1, 2023
github-actions Bot pushed a commit that referenced this pull request Dec 15, 2023
github-actions Bot pushed a commit that referenced this pull request Jan 1, 2024
jhance pushed a commit to jhance/mypy that referenced this pull request Jan 31, 2024
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request Feb 3, 2024
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request Feb 3, 2024
github-actions Bot pushed a commit that referenced this pull request Feb 15, 2024
github-actions Bot pushed a commit that referenced this pull request Mar 1, 2024
AlexWaygood pushed a commit to AlexWaygood/mypy that referenced this pull request Mar 16, 2024
github-actions Bot pushed a commit that referenced this pull request Apr 1, 2024
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2024
github-actions Bot pushed a commit that referenced this pull request May 1, 2024
github-actions Bot pushed a commit that referenced this pull request May 15, 2024
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request May 15, 2024
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request Jun 20, 2024
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request Jun 20, 2024
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant