-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Added check for the use of an ellipsis for a default argument value f… #6015
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
…or a function that is not in a stub, not overloaded, and without a placeholder implementation. This addresses #5985.
This comment has been minimized.
This comment has been minimized.
@Gobot1234, this change will require a modification to your code base. You're using BTW, while looking into the new errors, I ran across the comment "# I won't tell Eric if you won't. (This isn't part of PEP 696)". 😀 |
Diff from mypy_primer, showing the effect of this PR on open source code: pydantic (https://github.com/samuelcolvin/pydantic)
+ /tmp/mypy_primer/projects/pydantic/pydantic/type_adapter.py:130:70 - error: Expression of type "ellipsis" cannot be assigned to parameter of type "ConfigDict | None"
+ Type "ellipsis" cannot be assigned to type "ConfigDict | None"
+ "ellipsis" is incompatible with "ConfigDict"
+ Type cannot be assigned to type "None" (reportGeneralTypeIssues)
- 49 errors, 0 warnings, 0 informations
+ 50 errors, 0 warnings, 0 informations
steam.py (https://github.com/Gobot1234/steam.py)
+ /tmp/mypy_primer/projects/steam.py/steam/chat.py:795:49 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/gateway.py:494:63 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/gateway.py:500:73 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/gateway.py:578:84 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(ProtoMsgsT@send_proto_and_wait) -> bool" in function "send_proto_and_wait"
+ Type "ellipsis" cannot be assigned to type "(ProtoMsgsT@send_proto_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/gateway.py:619:63 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/gateway.py:634:65 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/profile.py
+ /tmp/mypy_primer/projects/steam.py/steam/profile.py:145:21 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:496:58 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:527:58 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:547:64 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:573:21 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:627:51 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:646:61 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:661:61 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:674:58 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:685:80 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(ProtoMsgsT@send_proto_and_wait) -> bool" in function "send_proto_and_wait"
+ Type "ellipsis" cannot be assigned to type "(ProtoMsgsT@send_proto_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:694:54 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:705:66 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(ProtoMsgsT@send_proto_and_wait) -> bool" in function "send_proto_and_wait"
+ Type "ellipsis" cannot be assigned to type "(ProtoMsgsT@send_proto_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:714:64 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(ProtoMsgsT@send_proto_and_wait) -> bool" in function "send_proto_and_wait"
+ Type "ellipsis" cannot be assigned to type "(ProtoMsgsT@send_proto_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:725:61 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(ProtoMsgsT@send_proto_and_wait) -> bool" in function "send_proto_and_wait"
+ Type "ellipsis" cannot be assigned to type "(ProtoMsgsT@send_proto_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:738:53 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:751:57 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:758:56 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:771:67 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:794:21 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:809:47 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(ProtoMsgsT@send_proto_and_wait) -> bool" in function "send_proto_and_wait"
+ Type "ellipsis" cannot be assigned to type "(ProtoMsgsT@send_proto_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:814:50 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:819:50 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/state.py:838:73 - error: Argument of type "ellipsis" cannot be assigned to parameter "check" of type "(UnifiedMsgT@send_um_and_wait) -> bool" in function "send_um_and_wait"
+ Type "ellipsis" cannot be assigned to type "(UnifiedMsgT@send_um_and_wait) -> bool" (reportGeneralTypeIssues)
... (truncated 158 lines) ...
|
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.
…or a function that is not in a stub, not overloaded, and without a placeholder implementation. This addresses #5985.