You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated conformance tests and results for latest versions of type che… (#1863)
* Updated conformance tests and results for latest versions of type checkers.
One test case in the `generics_syntax_infer_variance` was commented out temporarily until we decide how to handle variance inference for dataclasses in Python 3.13.
Mypy version was updated from 1.11.1 to 1.11.2. Minor error message change but no other substantive changes to the conformance results.
Pyright version was updated from 1.1.374 to 1.1.384. Many error messages changed slightly. Tests also identified three conformance regressions.
Pytype version was updated from 2024.04.11 to 2024.09.13. Error message format changed significantly, requiring updates to the test logic. No other substantive changes to conformance results.
Changed test infrastructure to make sure old versions of type checkers are uninstalled before installing new to guarantee correct version and increase determinism of timings.
* Added "--version" invocation to mypy after installation to eliminate the artificial time associated with malware scanning on MacOS.
Copy file name to clipboardExpand all lines: conformance/results/pyre/annotations_forward_refs.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Does not generate error for unquoted type defined in class scope.
8
8
Does not treat triple-quoted forward reference annotation as implicitly parenthesized.
9
9
"""
10
10
output = """
11
-
annotations_forward_refs.py:41:8 Undefined or invalid type [11]: Annotation `eval(.join(map(chr, [105, 110, 116])))` is not defined as a type.
11
+
annotations_forward_refs.py:41:8 Invalid type [31]: Expression `eval("".join(map(chr, [105, 110, 116])))` is not a valid type.
12
12
annotations_forward_refs.py:42:8 Invalid type [31]: Expression `"[int, str]"` is not a valid type.
13
13
annotations_forward_refs.py:43:8 Invalid type [31]: Expression `"(int, str)"` is not a valid type.
14
14
annotations_forward_refs.py:44:8 Undefined or invalid type [11]: Annotation `comprehension(int for generators(generator($target$i in range(1) if )))` is not defined as a type.
Copy file name to clipboardExpand all lines: conformance/results/pyright/aliases_implicit.toml
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ aliases_implicit.py:78:29 - error: Too many type arguments provided for "GoodTyp
7
7
aliases_implicit.py:79:29 - error: Too many type arguments provided for "GoodTypeAlias8[T@GoodTypeAlias8]"; expected 1 but received 2 (reportInvalidTypeForm)
8
8
aliases_implicit.py:80:24 - error: Expected ParamSpec, ellipsis, or list of types (reportInvalidTypeForm)
9
9
aliases_implicit.py:81:9 - error: Could not specialize type "GoodTypeAlias12[TFloat@GoodTypeAlias12]"
10
-
Type "str" is incompatible with type "float"
11
-
"str" is incompatible with "float" (reportInvalidTypeForm)
10
+
Type "str" is not assignable to type "float"
11
+
"str" is not assignable to "float" (reportInvalidTypeForm)
12
12
aliases_implicit.py:106:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)
13
13
aliases_implicit.py:107:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)
14
14
aliases_implicit.py:108:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)
@@ -23,8 +23,7 @@ aliases_implicit.py:116:10 - error: Variable not allowed in type expression (rep
23
23
aliases_implicit.py:117:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
24
24
aliases_implicit.py:118:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
25
25
aliases_implicit.py:119:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)
26
-
aliases_implicit.py:133:6 - error: Object of type "UnionType" is not callable
27
-
Attribute "__call__" is unknown (reportCallIssue)
26
+
aliases_implicit.py:133:6 - error: Object of type "UnionType" is not callable (reportCallIssue)
28
27
aliases_implicit.py:135:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments)
29
28
aliases_implicit.py:135:5 - error: Type "set[Unknown]" is already specialized (reportInvalidTypeArguments)
0 commit comments