-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Use Never in more messages, use ambiguous in join #17304
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
Switches the logic from python#16994 to use ambiguous (since is_noreturn was only meant for error messages) See also python#15996
Diff from mypy_primer, showing the effect of this PR on open source code: steam.py (https://github.com/Gobot1234/steam.py)
- steam/types/vdf.py:31: error: Incompatible return value type (implicitly returns "None", expected "NoReturn") [empty-body]
+ steam/types/vdf.py:31: error: Incompatible return value type (implicitly returns "None", expected "Never") [empty-body]
- steam/types/vdf.py:33: error: Incompatible return value type (implicitly returns "None", expected "NoReturn") [empty-body]
+ steam/types/vdf.py:33: error: Incompatible return value type (implicitly returns "None", expected "Never") [empty-body]
- steam/ext/commands/commands.py:245: error: Value of type "Callable[[VarArg(Any), KwArg(Any)], NoReturn]" is not indexable [index]
+ steam/ext/commands/commands.py:245: error: Value of type "Callable[[VarArg(Any), KwArg(Any)], Never]" is not indexable [index]
Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/parsing.py:599: error: Never has no attribute "__iter__" (not iterable) [attr-defined]
+ tanjun/parsing.py:599: error: "Never" has no attribute "__iter__" (not iterable) [attr-defined]
- tanjun/dependencies/limiters.py:857: error: Never has no attribute "unlock" [attr-defined]
+ tanjun/dependencies/limiters.py:857: error: "Never" has no attribute "unlock" [attr-defined]
- tanjun/clients.py:2291: error: Never has no attribute "__iter__" (not iterable) [attr-defined]
+ tanjun/clients.py:2291: error: "Never" has no attribute "__iter__" (not iterable) [attr-defined]
sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/transforms/i18n.py:443:17: error: Never has no attribute "apply_translated_message" [attr-defined]
+ sphinx/transforms/i18n.py:443:17: error: "Never" has no attribute "apply_translated_message" [attr-defined]
streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/runtime/fragment_test.py:161:20: error: Non-overlapping equality check (left operand type: "Callable[..., NoReturn]", right operand type: "Literal[7]") [comparison-overlap]
+ lib/tests/streamlit/runtime/fragment_test.py:161:20: error: Non-overlapping equality check (left operand type: "Callable[..., Never]", right operand type: "Literal[7]") [comparison-overlap]
- lib/tests/streamlit/runtime/fragment_test.py:165:13: error: Unsupported operand types for + ("Callable[..., NoReturn]" and "int") [operator]
+ lib/tests/streamlit/runtime/fragment_test.py:165:13: error: Unsupported operand types for + ("Callable[..., Never]" and "int") [operator]
- lib/tests/streamlit/runtime/fragment_test.py:205:13: error: Unsupported operand types for + ("Callable[..., NoReturn]" and "int") [operator]
+ lib/tests/streamlit/runtime/fragment_test.py:205:13: error: Unsupported operand types for + ("Callable[..., Never]" and "int") [operator]
ibis (https://github.com/ibis-project/ibis)
- ibis/backends/sql/datatypes.py:795: note: def _from_sqlglot_MAP(cls) -> NoReturn
+ ibis/backends/sql/datatypes.py:795: note: def _from_sqlglot_MAP(cls) -> Never
|
cdce8p
approved these changes
May 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @hauntsaninja 👍🏻
GiorgosPapoutsakis
pushed a commit
to GiorgosPapoutsakis/mypy
that referenced
this pull request
Jun 3, 2024
Switches the logic from python#16994 to use ambiguous (since is_noreturn was only meant for error messages) See also python#15996
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.
Suggestion cannot be applied right now. Please check back later.
Switches the logic from #16994 to use ambiguous (since is_noreturn was only meant for error messages)
See also #15996