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
Copy file name to clipboardExpand all lines: conformance/results/ty/aliases_implicit.toml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,10 @@ aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments
20
20
aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
21
21
aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
22
22
aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int | float` of type variable `TFloat@GoodTypeAlias12`
23
-
aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[Unknown | <class 'int'> | <class 'str'>]` is not allowed in a type expression
23
+
aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[<class 'int'> | <class 'str'>]` is not allowed in a type expression
24
24
aliases_implicit.py:108:9: error[invalid-type-form] Variable of type `tuple[tuple[<class 'int'>, <class 'str'>]]` is not allowed in a type expression
25
-
aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[Unknown | <class 'int'>]` is not allowed in a type expression
26
-
aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[Unknown | str, Unknown | str]` is not allowed in a type expression
25
+
aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[<class 'int'>]` is not allowed in a type expression
26
+
aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[str, str]` is not allowed in a type expression
27
27
aliases_implicit.py:114:9: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
28
28
aliases_implicit.py:115:10: error[invalid-type-form] Variable of type `Literal[True]` is not allowed in a type expression
29
29
aliases_implicit.py:116:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
Copy file name to clipboardExpand all lines: conformance/results/ty/aliases_type_statement.toml
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,19 @@ conformance_automated = "Fail"
2
2
conformant = "Partial"
3
3
notes = """
4
4
Does not reject use of the `type` statement inside functions.
5
-
Does not reject attempts to use legacy type variables in new-tyle type aliases.
6
5
Does not reject circular definitions of type aliases.
7
6
Does not reject redeclarations of type aliases.
8
7
Does not support `type` statements generic over `TypeVarTuple`s.
9
8
"""
10
9
errors_diff = """
11
10
Line 56: Expected 1 errors
12
-
Line 62: Expected 1 errors
13
-
Line 67: Expected 1 errors
14
11
Line 84: Expected 1 errors
15
12
Lines 51, 52: Expected error (tag 'TA14')
16
-
Line 10: Unexpected errors ['aliases_type_statement.py:10:52: error[invalid-type-arguments] Too many type arguments: expected 2, got 3']
13
+
Line 10: Unexpected errors ['aliases_type_statement.py:10:52: error[invalid-type-arguments] Too many type arguments: expected 2, got 3', 'aliases_type_statement.py:10:52: error[invalid-type-form] `...` is not allowed in this context in a type expression']
17
14
"""
18
15
output = """
19
16
aliases_type_statement.py:10:52: error[invalid-type-arguments] Too many type arguments: expected 2, got 3
17
+
aliases_type_statement.py:10:52: error[invalid-type-form] `...` is not allowed in this context in a type expression
20
18
aliases_type_statement.py:17:1: error[unresolved-attribute] Object of type `TypeAliasType` has no attribute `bit_count`
21
19
aliases_type_statement.py:19:1: error[call-non-callable] Object of type `TypeAliasType` is not callable
22
20
aliases_type_statement.py:23:7: error[unresolved-attribute] Object of type `TypeAliasType` has no attribute `other_attrib`
@@ -29,14 +27,16 @@ aliases_type_statement.py:39:23: error[invalid-type-form] Tuple literals are not
29
27
aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type expressions
30
28
aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type expressions
31
29
aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type expressions
32
-
aliases_type_statement.py:43:22: error[invalid-type-form] Invalid subscript of object of type `list[Unknown | <class 'int'>]` in type expression
30
+
aliases_type_statement.py:43:22: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'>]` in type expression
33
31
aliases_type_statement.py:43:28: error[invalid-type-form] Int literals are not allowed in this context in a type expression
34
32
aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type expressions
35
33
aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
36
34
aliases_type_statement.py:46:23: error[invalid-type-form] Boolean literals are not allowed in this context in a type expression
37
35
aliases_type_statement.py:47:23: error[invalid-type-form] Int literals are not allowed in this context in a type expression
38
36
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type expressions
39
37
aliases_type_statement.py:49:23: error[fstring-type-annotation] Type expressions cannot use f-strings
38
+
aliases_type_statement.py:62:23: error[unbound-type-variable] Type variable `V` is not bound to any outer generic context
39
+
aliases_type_statement.py:67:17: error[unbound-type-variable] Type variable `T1` is not bound to any outer generic context
40
40
aliases_type_statement.py:77:27: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int` of type variable `S@RecursiveTypeAlias2`
41
41
aliases_type_statement.py:79:32: error[invalid-type-arguments] Type `int` is not assignable to upper bound `str` of type variable `T@RecursiveTypeAlias2`
42
42
aliases_type_statement.py:82:1: error[cyclic-type-alias-definition] Cyclic definition of `RecursiveTypeAlias3`
Copy file name to clipboardExpand all lines: conformance/results/ty/annotations_forward_refs.toml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ conformance_automated = "Fail"
2
2
conformant = "Partial"
3
3
notes = """
4
4
Does not detect runtime errors from partially stringified PEP-604 unions.
5
-
Resolves references in type annotations as referring to end-of-scope types (https://discuss.python.org/t/annotation-string-references-in-class-scope-in-conformance-tests/105439)
5
+
Resolves references in type annotations as referring to end-of-scope types (https://discuss.python.org/t/annotation-string-references-in-class-scope-in-conformance-tests/105439, https://github.com/python/typing/pull/2144)
6
6
"""
7
7
errors_diff = """
8
8
Line 24: Expected 1 errors
@@ -21,7 +21,7 @@ annotations_forward_refs.py:43:10: error[invalid-type-form] Tuple literals are n
21
21
annotations_forward_refs.py:44:10: error[invalid-type-form] List comprehensions are not allowed in type expressions
22
22
annotations_forward_refs.py:45:10: error[invalid-type-form] Dict literals are not allowed in type expressions
23
23
annotations_forward_refs.py:46:10: error[invalid-type-form] Function calls are not allowed in type expressions
24
-
annotations_forward_refs.py:47:10: error[invalid-type-form] Invalid subscript of object of type `list[Unknown | <class 'int'>]` in type expression
24
+
annotations_forward_refs.py:47:10: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'>]` in type expression
25
25
annotations_forward_refs.py:47:16: error[invalid-type-form] Int literals are not allowed in this context in a type expression
26
26
annotations_forward_refs.py:48:10: error[invalid-type-form] `if` expressions are not allowed in type expressions
27
27
annotations_forward_refs.py:49:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
Copy file name to clipboardExpand all lines: conformance/results/ty/callables_annotation.toml
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,11 @@
1
1
conformance_automated = "Fail"
2
2
conformant = "Partial"
3
3
notes = """
4
-
Does not reject `Callable[[...], int]` in a type expression.
5
4
Does not support `Concatenate`.
6
5
Infers a callback protocol as being a gradual type if the callback has signature `__call__[T](self, *args: T, **kwargs: T)` and `T` has been explicitly specialized to `Any`.
7
6
Does not infer a callback protocol as being a gradual type if the callback has signature `__call__(self, a: int, /, *args: Any, **kwargs: Any)`.
8
7
"""
9
8
errors_diff = """
10
-
Line 59: Expected 1 errors
11
9
Line 91: Expected 1 errors
12
10
Line 93: Expected 1 errors
13
11
Line 159: Expected 1 errors
@@ -30,5 +28,6 @@ callables_annotation.py:56:14: error[invalid-type-form] The first argument to `C
30
28
callables_annotation.py:57:18: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `list[int]`?
31
29
callables_annotation.py:58:5: error[invalid-type-form] Special form `typing.Callable` expected exactly two arguments (parameter types and return type)
32
30
callables_annotation.py:58:14: error[invalid-type-form] The first argument to `Callable` must be either a list of types, ParamSpec, Concatenate, or `...`
31
+
callables_annotation.py:59:14: error[invalid-type-form] `[...]` is not a valid parameter list for `Callable`: Did you mean `Callable[..., int]`?
33
32
callables_annotation.py:157:20: error[invalid-assignment] Object of type `Proto7` is not assignable to `Proto6`
Copy file name to clipboardExpand all lines: conformance/results/ty/callables_subtyping.toml
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,5 @@
1
-
conformance_automated = "Fail"
2
-
conformant = "Partial"
3
-
notes = """
4
-
Does not reject assigning a callable with a single variadic positional parameter to a variable declared with a `Callable` type that accepts certain specific keyword arguments.
5
-
"""
1
+
conformance_automated = "Pass"
6
2
errors_diff = """
7
-
Line 125: Expected 1 errors
8
3
"""
9
4
output = """
10
5
callables_subtyping.py:26:36: error[invalid-assignment] Object of type `(int, /) -> int` is not assignable to `(int | float, /) -> int | float`
@@ -21,6 +16,7 @@ callables_subtyping.py:119:23: error[invalid-assignment] Object of type `StrArgs
21
16
callables_subtyping.py:120:23: error[invalid-assignment] Object of type `IntArgs4` is not assignable to `IntStrArgs4`
22
17
callables_subtyping.py:122:20: error[invalid-assignment] Object of type `IntArgs4` is not assignable to `StrArgs4`
23
18
callables_subtyping.py:124:20: error[invalid-assignment] Object of type `StrArgs4` is not assignable to `IntArgs4`
19
+
callables_subtyping.py:125:22: error[invalid-assignment] Object of type `IntStrArgs4` is not assignable to `Standard4`
24
20
callables_subtyping.py:126:22: error[invalid-assignment] Object of type `StrArgs4` is not assignable to `Standard4`
25
21
callables_subtyping.py:151:22: error[invalid-assignment] Object of type `NoKwargs5` is not assignable to `IntKwargs5`
26
22
callables_subtyping.py:154:24: error[invalid-assignment] Object of type `NoKwargs5` is not assignable to `FloatKwargs5`
Copy file name to clipboardExpand all lines: conformance/results/ty/constructors_callable.toml
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,12 @@ errors_diff = """
4
4
Line 66: Expected 1 errors
5
5
Line 67: Expected 1 errors
6
6
Line 68: Expected 1 errors
7
-
Line 186: Expected 1 errors
8
-
Line 197: Expected 1 errors
9
7
Line 102: Unexpected errors ['constructors_callable.py:102:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`']
10
8
Line 107: Unexpected errors ['constructors_callable.py:107:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`']
11
9
Line 143: Unexpected errors ["constructors_callable.py:143:27: error[invalid-argument-type] Argument to function `accepts_callable` is incorrect: Expected `() -> Any | Class6Any`, found `<class 'Class6Any'>`"]
12
10
Line 145: Unexpected errors ['constructors_callable.py:145:1: error[type-assertion-failure] Type `Any | Class6Any` does not match asserted type `Any`']
13
11
Line 166: Unexpected errors ['constructors_callable.py:166:1: error[type-assertion-failure] Type `Class7[int] | Class7[str]` does not match asserted type `Class7[int]`']
14
12
Line 167: Unexpected errors ['constructors_callable.py:167:1: error[type-assertion-failure] Type `Class7[int] | Class7[str]` does not match asserted type `Class7[str]`']
15
-
Line 185: Unexpected errors ['constructors_callable.py:185:1: error[type-assertion-failure] Type `Class8[Unknown | str]` does not match asserted type `Class8[str]`']
0 commit comments