-
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 code to conform with the new checks mandated in the typing spec… #9757
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
… for `@final` and `@override` applied to an overload. This addresses #9747.
Diff from mypy_primer, showing the effect of this PR on open source code: steam.py (https://github.com/Gobot1234/steam.py)
+ /tmp/mypy_primer/projects/steam.py/steam/client.py:369:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload)
+ /tmp/mypy_primer/projects/steam.py/steam/client.py:381:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload)
- 8509 errors, 94 warnings, 0 informations
+ 8511 errors, 94 warnings, 0 informations
sympy (https://github.com/sympy/sympy)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/autowrap.py:1176:30 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/autowrap.py:1177:28 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/matchpy_connector.py:288:16 - error: Type "Basic" is not assignable to declared type "Expr"
- "Basic" is not assignable to "Expr" (reportAssignmentType)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:54:33 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:54:39 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- Attribute "label" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:55:54 - error: Cannot access attribute "label" for class "Basic"
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:55:63 - error: Cannot access attribute "label" for class "Basic"
- Attribute "label" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:379:30 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:379:36 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:379:44 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:425:41 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:425:47 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:446:30 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:446:36 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:446:44 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1105:30 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1105:36 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1105:44 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1164:41 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1164:47 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1176:9 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1177:9 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1178:9 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1232:30 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1232:36 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1232:44 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1293:46 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen.py:1293:57 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_julia.py:484:43 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_julia.py:484:49 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_julia.py:484:57 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_julia.py:516:42 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_julia.py:516:48 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_julia.py:516:59 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_octave.py:459:43 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_octave.py:459:49 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_octave.py:459:57 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_octave.py:490:42 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_octave.py:490:48 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_codegen_octave.py:490:59 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_lambdify.py:1125:28 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_lambdify.py:1138:29 - error: "__getitem__" method not defined on type "Basic" (reportIndexIssue)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:120:18 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+ /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:120:18 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
- Type "Equality | Unknown" is not assignable to type "Expr"
+ Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
- "Equality" is not assignable to "Expr" (reportArgumentType)
+ "Relational" is not assignable to "Expr" (reportArgumentType)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:123:18 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+ /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:123:18 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
- Type "Equality | Unknown" is not assignable to type "Expr"
+ Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
- "Equality" is not assignable to "Expr" (reportArgumentType)
+ "Relational" is not assignable to "Expr" (reportArgumentType)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:126:9 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+ /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:126:9 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
- Type "Equality | Unknown" is not assignable to type "Expr"
+ Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
- "Equality" is not assignable to "Expr" (reportArgumentType)
+ "Relational" is not assignable to "Expr" (reportArgumentType)
- /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:132:9 - error: Argument of type "Equality | Unknown" cannot be assigned to parameter "expr" of type "Expr" in function "add"
+ /tmp/mypy_primer/projects/sympy/sympy/utilities/tests/test_matchpy_connector.py:132:9 - error: Argument of type "Equality | Unknown | Relational | Unequality | Integer" cannot be assigned to parameter "expr" of type "Expr" in function "add"
- Type "Equality | Unknown" is not assignable to type "Expr"
+ Type "Equality | Unknown | Relational | Unequality | Integer" is not assignable to type "Expr"
- "Equality" is not assignable to "Expr" (reportArgumentType)
+ "Relational" is not assignable to "Expr" (reportArgumentType)
... (truncated 143 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.
… for
@final
and@override
applied to an overload. This addresses #9747.