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
@@ -312,7 +312,7 @@ <h3>Python Type System Conformance Test Results</h3>
312
312
<thclass="column col2 conformant">Pass</th>
313
313
<thclass="column col2 conformant">Pass</th>
314
314
<thclass="column col2 conformant">Pass</th>
315
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject using a bare `ParamSpec` as a type alias value.</p></span></div></th>
@@ -531,7 +531,7 @@ <h3>Python Type System Conformance Test Results</h3>
531
531
<thclass="column col2 conformant">Pass</th>
532
532
<thclass="column col2 conformant">Pass</th>
533
533
<thclass="column col2 conformant">Pass</th>
534
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not emit a diagnostic on an invalid use of a variable as the right-hand side of a type alias.</p><p>Does not emit a diagnostic if a type alias to a union, in which every element of the union is implicitly specialized with `Unknown`, is invalidly specialized again.</p></span></div></th>
534
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not emit a diagnostic if a type alias to a union, in which every element of the union is implicitly specialized with `Unknown`, is invalidly specialized again.</p></span></div></th>
@@ -961,7 +961,7 @@ <h3>Python Type System Conformance Test Results</h3>
961
961
<thclass="column col2 conformant">Pass</th>
962
962
<thclass="column col2 conformant">Pass</th>
963
963
<thclass="column col2 conformant">Pass</th>
964
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not validate overrides of `TypedDict` fields in subclasses.</p></span></div></th>
@@ -989,7 +989,7 @@ <h3>Python Type System Conformance Test Results</h3>
989
989
<thclass="column col2 conformant">Pass</th>
990
990
<thclass="column col2 conformant">Pass</th>
991
991
<thclass="column col2 conformant">Pass</th>
992
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not validate overrides of `TypedDict` keys.</p></span></div></th>
Does not emit a diagnostic on an invalid use of a variable as the right-hand side of a type alias.
5
4
Does not emit a diagnostic if a type alias to a union, in which every element of the union is implicitly specialized with `Unknown`, is invalidly specialized again.
aliases_explicit.py:69:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
15
13
aliases_explicit.py:70:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
16
14
aliases_explicit.py:71:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
17
-
aliases_explicit.py:79:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
18
-
aliases_explicit.py:80:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
19
-
aliases_explicit.py:81:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
20
-
aliases_explicit.py:82:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
21
-
aliases_explicit.py:83:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
22
-
aliases_explicit.py:84:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
23
-
aliases_explicit.py:85:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
24
-
aliases_explicit.py:86:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
25
-
aliases_explicit.py:88:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
26
-
aliases_explicit.py:89:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
27
-
aliases_explicit.py:90:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
28
-
aliases_explicit.py:91:1: error[invalid-type-form] Invalid right-hand side for `typing.TypeAlias` assignment
15
+
aliases_explicit.py:79:21: error[invalid-type-form] Function calls are not allowed in type alias values
16
+
aliases_explicit.py:80:21: error[invalid-type-form] List literals are not allowed in this context in a type alias value
17
+
aliases_explicit.py:81:21: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias value
18
+
aliases_explicit.py:82:21: error[invalid-type-form] List comprehensions are not allowed in type alias values
19
+
aliases_explicit.py:83:21: error[invalid-type-form] Dict literals are not allowed in type alias values
20
+
aliases_explicit.py:84:21: error[invalid-type-form] Function calls are not allowed in type alias values
21
+
aliases_explicit.py:85:21: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias values
22
+
aliases_explicit.py:86:21: error[invalid-type-form] `if` expressions are not allowed in type alias values
23
+
aliases_explicit.py:87:21: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type alias value
24
+
aliases_explicit.py:88:22: error[invalid-type-form] Boolean literals are not allowed in this context in a type alias value: Did you mean `typing.Literal[True]`?
25
+
aliases_explicit.py:89:22: error[invalid-type-form] Int literals are not allowed in this context in a type alias value: Did you mean `typing.Literal[1]`?
26
+
aliases_explicit.py:90:22: error[invalid-type-form] Boolean operations are not allowed in type alias values
27
+
aliases_explicit.py:91:22: error[invalid-type-form] F-strings are not allowed in type alias values
29
28
aliases_explicit.py:101:6: error[call-non-callable] Object of type `UnionType` is not callable
Copy file name to clipboardExpand all lines: conformance/results/ty/aliases_implicit.toml
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments
18
18
aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
19
19
aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
20
20
aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int | float` of type variable `TFloat@GoodTypeAlias12`
21
-
aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[<class 'int'> | <class 'str'>]` is not allowed in a type expression
22
-
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
23
-
aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[<class 'int'>]` is not allowed in a type expression
24
-
aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[str, str]` is not allowed in a type expression
25
-
aliases_implicit.py:114:9: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
26
-
aliases_implicit.py:115:10: error[invalid-type-form] Variable of type `Literal[True]` is not allowed in a type expression
27
-
aliases_implicit.py:116:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
28
-
aliases_implicit.py:118:10: error[invalid-type-form] Variable of type `Literal["int"]` is not allowed in a type expression
29
-
aliases_implicit.py:119:10: error[invalid-type-form] Variable of type `Literal["int | str"]` is not allowed in a type expression
21
+
aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[<class 'int'> | <class 'str'>]` is not allowed in a parameter annotation
22
+
aliases_implicit.py:108:9: error[invalid-type-form] Variable of type `tuple[tuple[<class 'int'>, <class 'str'>]]` is not allowed in a parameter annotation
23
+
aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[<class 'int'>]` is not allowed in a parameter annotation
24
+
aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[str, str]` is not allowed in a parameter annotation
25
+
aliases_implicit.py:114:9: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a parameter annotation
26
+
aliases_implicit.py:115:10: error[invalid-type-form] Variable of type `Literal[True]` is not allowed in a parameter annotation
27
+
aliases_implicit.py:116:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a parameter annotation
28
+
aliases_implicit.py:118:10: error[invalid-type-form] Variable of type `Literal["int"]` is not allowed in a parameter annotation
29
+
aliases_implicit.py:119:10: error[invalid-type-form] Variable of type `Literal["int | str"]` is not allowed in a parameter annotation
30
30
aliases_implicit.py:133:6: error[call-non-callable] Object of type `UnionType` is not callable
Copy file name to clipboardExpand all lines: conformance/results/ty/aliases_type_statement.toml
+15-17Lines changed: 15 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -10,31 +10,29 @@ errors_diff = """
10
10
Line 56: Expected 1 errors
11
11
Line 84: Expected 1 errors
12
12
Lines 51, 52: Expected error (tag 'TA14')
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']
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 alias value']
14
14
"""
15
15
output = """
16
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
17
+
aliases_type_statement.py:10:52: error[invalid-type-form] `...` is not allowed in this context in a type alias value
18
18
aliases_type_statement.py:17:1: error[unresolved-attribute] Object of type `TypeAliasType` has no attribute `bit_count`
19
19
aliases_type_statement.py:19:1: error[call-non-callable] Object of type `TypeAliasType` is not callable
20
20
aliases_type_statement.py:23:7: error[unresolved-attribute] Object of type `TypeAliasType` has no attribute `other_attrib`
21
21
aliases_type_statement.py:26:18: error[invalid-base] Invalid class base with type `TypeAliasType`
22
22
aliases_type_statement.py:31:22: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `type | UnionType | tuple[Divergent, ...]`, found `TypeAliasType`
23
-
aliases_type_statement.py:37:22: error[invalid-type-form] Function calls are not allowed in type expressions
24
-
aliases_type_statement.py:38:22: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
25
-
aliases_type_statement.py:39:22: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression
26
-
aliases_type_statement.py:39:23: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
27
-
aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type expressions
28
-
aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type expressions
29
-
aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type expressions
30
-
aliases_type_statement.py:43:22: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'>]` in type expression
31
-
aliases_type_statement.py:43:28: error[invalid-type-form] Int literals are not allowed in this context in a type expression
32
-
aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type expressions
33
-
aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
34
-
aliases_type_statement.py:46:23: error[invalid-type-form] Boolean literals are not allowed in this context in a type expression
35
-
aliases_type_statement.py:47:23: error[invalid-type-form] Int literals are not allowed in this context in a type expression
36
-
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type expressions
37
-
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type expressions
23
+
aliases_type_statement.py:37:22: error[invalid-type-form] Function calls are not allowed in type alias values
24
+
aliases_type_statement.py:38:22: error[invalid-type-form] List literals are not allowed in this context in a type alias value
25
+
aliases_type_statement.py:39:22: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias value
26
+
aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type alias values
27
+
aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type alias values
28
+
aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type alias values
29
+
aliases_type_statement.py:43:22: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias values
30
+
aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type alias values
31
+
aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type alias value
32
+
aliases_type_statement.py:46:23: error[invalid-type-form] Boolean literals are not allowed in this context in a type alias value: Did you mean `typing.Literal[True]`?
33
+
aliases_type_statement.py:47:23: error[invalid-type-form] Int literals are not allowed in this context in a type alias value: Did you mean `typing.Literal[1]`?
34
+
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type alias values
35
+
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type alias values
38
36
aliases_type_statement.py:62:23: error[unbound-type-variable] Type variable `V` is not bound to any outer generic context
39
37
aliases_type_statement.py:67:17: error[unbound-type-variable] Type variable `T1` is not bound to any outer generic context
40
38
aliases_type_statement.py:77:27: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int` of type variable `S@RecursiveTypeAlias2`
Copy file name to clipboardExpand all lines: conformance/results/ty/aliases_typealiastype.toml
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -18,18 +18,16 @@ Line 48: Expected 1 errors
18
18
output = """
19
19
aliases_typealiastype.py:32:7: error[unresolved-attribute] Object of type `TypeAliasType` has no attribute `other_attrib`
20
20
aliases_typealiastype.py:52:40: error[invalid-type-form] Function calls are not allowed in type expressions
21
-
aliases_typealiastype.py:53:40: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
21
+
aliases_typealiastype.py:53:40: error[invalid-type-form] List literals are not allowed in this context in a type expression
22
22
aliases_typealiastype.py:54:42: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression
23
-
aliases_typealiastype.py:54:43: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
24
23
aliases_typealiastype.py:55:42: error[invalid-type-form] List comprehensions are not allowed in type expressions
25
24
aliases_typealiastype.py:56:42: error[invalid-type-form] Dict literals are not allowed in type expressions
26
25
aliases_typealiastype.py:57:42: error[invalid-type-form] Function calls are not allowed in type expressions
27
-
aliases_typealiastype.py:58:42: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'>]` in type expression
28
-
aliases_typealiastype.py:58:48: error[invalid-type-form] Int literals are not allowed in this context in a type expression
26
+
aliases_typealiastype.py:58:42: error[invalid-type-form] Only simple names and dotted names can be subscripted in type expressions
29
27
aliases_typealiastype.py:59:42: error[invalid-type-form] `if` expressions are not allowed in type expressions
30
28
aliases_typealiastype.py:60:42: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
31
-
aliases_typealiastype.py:61:42: error[invalid-type-form] Boolean literals are not allowed in this context in a type expression
32
-
aliases_typealiastype.py:62:42: error[invalid-type-form] Int literals are not allowed in this context in a type expression
29
+
aliases_typealiastype.py:61:42: error[invalid-type-form] Boolean literals are not allowed in this context in a type expression: Did you mean `typing.Literal[True]`?
30
+
aliases_typealiastype.py:62:42: error[invalid-type-form] Int literals are not allowed in this context in a type expression: Did you mean `typing.Literal[1]`?
33
31
aliases_typealiastype.py:63:42: error[invalid-type-form] Boolean operations are not allowed in type expressions
34
32
aliases_typealiastype.py:64:42: error[invalid-type-form] F-strings are not allowed in type expressions
35
33
aliases_typealiastype.py:66:47: error[unresolved-reference] Name `BadAlias21` used when not defined
0 commit comments