Skip to content

Commit e6a6061

Browse files
Update ty results for v0.0.93 (#2378)
1 parent aa8dab0 commit e6a6061

13 files changed

Lines changed: 80 additions & 100 deletions

‎conformance/results/results.html‎

Lines changed: 5 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
1-
conformance_automated = "Fail"
2-
conformant = "Partial"
3-
notes = """
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.
5-
"""
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 100: Expected 1 errors
83
"""
94
output = """
10-
aliases_explicit.py:67:9: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'int | None'>`
11-
aliases_explicit.py:68:9: error[not-subscriptable] Cannot subscript non-generic type `<class 'list[int | None]'>`
5+
aliases_explicit.py:67:9: error[not-subscriptable] Cannot subscript non-generic type `int | None`
6+
aliases_explicit.py:68:9: error[not-subscriptable] Cannot subscript non-generic type `list[int | None]`
127
aliases_explicit.py:69:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
138
aliases_explicit.py:70:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
149
aliases_explicit.py:71:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
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
10+
aliases_explicit.py:79:21: error[invalid-type-form] Function calls are not allowed in type alias definitions
11+
aliases_explicit.py:80:21: error[invalid-type-form] List literals are not allowed in this context in a type alias definition
12+
aliases_explicit.py:81:21: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias definition
13+
aliases_explicit.py:82:21: error[invalid-type-form] List comprehensions are not allowed in type alias definitions
14+
aliases_explicit.py:83:21: error[invalid-type-form] Dict literals are not allowed in type alias definitions
15+
aliases_explicit.py:84:21: error[invalid-type-form] Function calls are not allowed in type alias definitions
16+
aliases_explicit.py:85:21: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias definitions
17+
aliases_explicit.py:86:21: error[invalid-type-form] `if` expressions are not allowed in type alias definitions
18+
aliases_explicit.py:87:21: error[invalid-type-form] Variable `var1` cannot be used as a type: Variable of type `Literal[3]` is not allowed in a type alias definition
19+
aliases_explicit.py:88:22: error[invalid-type-form] Boolean literals are not allowed in this context in a type alias definition: Did you mean `typing.Literal[True]`?
20+
aliases_explicit.py:89:22: error[invalid-type-form] Int literals are not allowed in this context in a type alias definition: Did you mean `typing.Literal[1]`?
21+
aliases_explicit.py:90:22: error[invalid-type-form] Boolean operations are not allowed in type alias definitions
22+
aliases_explicit.py:91:22: error[invalid-type-form] F-strings are not allowed in type alias definitions
23+
aliases_explicit.py:100:5: error[not-subscriptable] Cannot subscript non-generic type `list[Unknown]`
2824
aliases_explicit.py:101:6: error[call-non-callable] Object of type `UnionType` is not callable
29-
aliases_explicit.py:102:5: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'list[Unknown] | set[Unknown]'>`
25+
aliases_explicit.py:102:5: error[not-subscriptable] Cannot subscript non-generic type `list[Unknown] | set[Unknown]`
3026
"""
Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
1-
conformance_automated = "Fail"
2-
conformant = "Partial"
3-
notes = """
4-
Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.
5-
Falls short on full syntactic validation of type aliases.
6-
"""
1+
conformance_automated = "Pass"
72
errors_diff = """
8-
Line 106: Expected 1 errors
9-
Line 111: Expected 1 errors
10-
Line 112: Expected 1 errors
11-
Line 113: Expected 1 errors
12-
Line 117: Expected 1 errors
133
"""
144
output = """
15-
aliases_implicit.py:76:9: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'int | None'>`
16-
aliases_implicit.py:77:9: error[not-subscriptable] Cannot subscript non-generic type `<class 'list[int | None]'>`
5+
aliases_implicit.py:76:9: error[not-subscriptable] Cannot subscript non-generic type `int | None`
6+
aliases_implicit.py:77:9: error[not-subscriptable] Cannot subscript non-generic type `list[int | None]`
177
aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
188
aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
199
aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
2010
aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `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 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
11+
aliases_implicit.py:106:9: error[invalid-type-form] Variable `BadTypeAlias1` cannot be used as a type
12+
aliases_implicit.py:107:9: error[invalid-type-form] Variable `BadTypeAlias2` cannot be used as a type: Variable of type `list[<class 'int'> | <class 'str'>]` is not allowed in a parameter annotation
13+
aliases_implicit.py:108:9: error[invalid-type-form] Variable `BadTypeAlias3` cannot be used as a type: Variable of type `tuple[tuple[<class 'int'>, <class 'str'>]]` is not allowed in a parameter annotation
14+
aliases_implicit.py:109:9: error[invalid-type-form] Variable `BadTypeAlias4` cannot be used as a type: Variable of type `list[<class 'int'>]` is not allowed in a parameter annotation
15+
aliases_implicit.py:110:9: error[invalid-type-form] Variable `BadTypeAlias5` cannot be used as a type: Variable of type `dict[str, str]` is not allowed in a parameter annotation
16+
aliases_implicit.py:111:9: error[invalid-type-form] Variable `BadTypeAlias6` cannot be used as a type
17+
aliases_implicit.py:112:9: error[invalid-type-form] Variable `BadTypeAlias7` cannot be used as a type
18+
aliases_implicit.py:113:9: error[invalid-type-form] Variable `BadTypeAlias8` cannot be used as a type
19+
aliases_implicit.py:114:9: error[invalid-type-form] Variable `BadTypeAlias9` cannot be used as a type
20+
aliases_implicit.py:115:10: error[invalid-type-form] Variable `BadTypeAlias10` cannot be used as a type: Variable of type `Literal[True]` is not allowed in a parameter annotation
21+
aliases_implicit.py:116:10: error[invalid-type-form] Variable `BadTypeAlias11` cannot be used as a type: Variable of type `Literal[1]` is not allowed in a parameter annotation
22+
aliases_implicit.py:117:10: error[invalid-type-form] Variable `BadTypeAlias12` cannot be used as a type
23+
aliases_implicit.py:118:10: error[invalid-type-form] Variable `BadTypeAlias13` cannot be used as a type: Variable of type `Literal["int"]` is not allowed in a parameter annotation
2924
aliases_implicit.py:119:10: error[invalid-type-form] Variable of type `Literal["int | str"]` is not allowed in a parameter annotation
3025
aliases_implicit.py:133:6: error[call-non-callable] Object of type `UnionType` is not callable
31-
aliases_implicit.py:135:5: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'list[Unknown] | set[Unknown]'>`
26+
aliases_implicit.py:135:5: error[not-subscriptable] Cannot subscript non-generic type `list[Unknown] | set[Unknown]`
3227
"""

‎conformance/results/ty/aliases_type_statement.toml‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ aliases_type_statement.py:19:1: error[call-non-callable] Object of type `TypeAli
77
aliases_type_statement.py:23:7: error[unresolved-attribute] Object of type `TypeAliasType` has no attribute `other_attrib`
88
aliases_type_statement.py:26:18: error[invalid-base] Invalid class base with type `TypeAliasType`
99
aliases_type_statement.py:31:22: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `_ClassInfo`, found `TypeAliasType`
10-
aliases_type_statement.py:37:22: error[invalid-type-form] Function calls are not allowed in type alias values
11-
aliases_type_statement.py:38:22: error[invalid-type-form] List literals are not allowed in this context in a type alias value
12-
aliases_type_statement.py:39:22: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias value
13-
aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type alias values
14-
aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type alias values
15-
aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type alias values
16-
aliases_type_statement.py:43:22: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias values
17-
aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type alias values
18-
aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type alias value
19-
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]`?
20-
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]`?
21-
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type alias values
22-
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type alias values
10+
aliases_type_statement.py:37:22: error[invalid-type-form] Function calls are not allowed in type alias definitions
11+
aliases_type_statement.py:38:22: error[invalid-type-form] List literals are not allowed in this context in a type alias definition
12+
aliases_type_statement.py:39:22: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias definition
13+
aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type alias definitions
14+
aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type alias definitions
15+
aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type alias definitions
16+
aliases_type_statement.py:43:22: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias definitions
17+
aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type alias definitions
18+
aliases_type_statement.py:45:22: error[invalid-type-form] Variable `var1` cannot be used as a type: Variable of type `Literal[1]` is not allowed in a type alias definition
19+
aliases_type_statement.py:46:23: error[invalid-type-form] Boolean literals are not allowed in this context in a type alias definition: Did you mean `typing.Literal[True]`?
20+
aliases_type_statement.py:47:23: error[invalid-type-form] Int literals are not allowed in this context in a type alias definition: Did you mean `typing.Literal[1]`?
21+
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type alias definitions
22+
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type alias definitions
2323
aliases_type_statement.py:53:23: error[unbound-type-variable] Type variable `V` is not bound to any outer generic context
2424
aliases_type_statement.py:58:17: error[unbound-type-variable] Type variable `T1` is not bound to any outer generic context
2525
aliases_type_statement.py:68:27: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int` of type variable `S@RecursiveTypeAlias2`

‎conformance/results/ty/aliases_typealiastype.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ aliases_typealiastype.py:56:42: error[invalid-type-form] Dict literals are not a
1919
aliases_typealiastype.py:57:42: error[invalid-type-form] Function calls are not allowed in type expressions
2020
aliases_typealiastype.py:58:42: error[invalid-type-form] Only simple names and dotted names can be subscripted in type expressions
2121
aliases_typealiastype.py:59:42: error[invalid-type-form] `if` expressions are not allowed in type expressions
22-
aliases_typealiastype.py:60:42: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
22+
aliases_typealiastype.py:60:42: error[invalid-type-form] Variable `var1` cannot be used as a type: Variable of type `Literal[3]` is not allowed in a type expression
2323
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]`?
2424
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]`?
2525
aliases_typealiastype.py:63:42: error[invalid-type-form] Boolean operations are not allowed in type expressions

‎conformance/results/ty/annotations_forward_refs.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ annotations_forward_refs.py:45:10: error[invalid-type-form] Dict literals are no
1414
annotations_forward_refs.py:46:10: error[invalid-type-form] Function calls are not allowed in parameter annotations
1515
annotations_forward_refs.py:47:10: error[invalid-type-form] Only simple names and dotted names can be subscripted in parameter annotations
1616
annotations_forward_refs.py:48:10: error[invalid-type-form] `if` expressions are not allowed in parameter annotations
17-
annotations_forward_refs.py:49:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a parameter annotation
17+
annotations_forward_refs.py:49:10: error[invalid-type-form] Variable `var1` cannot be used as a type: Variable of type `Literal[1]` is not allowed in a parameter annotation
1818
annotations_forward_refs.py:50:11: error[invalid-type-form] Boolean literals are not allowed in this context in a parameter annotation: Did you mean `typing.Literal[True]`?
1919
annotations_forward_refs.py:51:11: error[invalid-type-form] Int literals are not allowed in this context in a parameter annotation: Did you mean `typing.Literal[1]`?
2020
annotations_forward_refs.py:52:11: error[invalid-type-form] Unary operations are not allowed in parameter annotations

0 commit comments

Comments
 (0)