Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions conformance/results/results.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 18 additions & 22 deletions conformance/results/ty/aliases_explicit.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
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.
"""
conformance_automated = "Pass"
errors_diff = """
Line 100: Expected 1 errors
"""
output = """
aliases_explicit.py:67:9: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'int | None'>`
aliases_explicit.py:68:9: error[not-subscriptable] Cannot subscript non-generic type `<class 'list[int | None]'>`
aliases_explicit.py:67:9: error[not-subscriptable] Cannot subscript non-generic type `int | None`
aliases_explicit.py:68:9: error[not-subscriptable] Cannot subscript non-generic type `list[int | None]`
aliases_explicit.py:69:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
aliases_explicit.py:70:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
aliases_explicit.py:71:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
aliases_explicit.py:79:21: error[invalid-type-form] Function calls are not allowed in type alias values
aliases_explicit.py:80:21: error[invalid-type-form] List literals are not allowed in this context in a type alias value
aliases_explicit.py:81:21: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias value
aliases_explicit.py:82:21: error[invalid-type-form] List comprehensions are not allowed in type alias values
aliases_explicit.py:83:21: error[invalid-type-form] Dict literals are not allowed in type alias values
aliases_explicit.py:84:21: error[invalid-type-form] Function calls are not allowed in type alias values
aliases_explicit.py:85:21: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias values
aliases_explicit.py:86:21: error[invalid-type-form] `if` expressions are not allowed in type alias values
aliases_explicit.py:87:21: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type alias value
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]`?
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]`?
aliases_explicit.py:90:22: error[invalid-type-form] Boolean operations are not allowed in type alias values
aliases_explicit.py:91:22: error[invalid-type-form] F-strings are not allowed in type alias values
aliases_explicit.py:79:21: error[invalid-type-form] Function calls are not allowed in type alias definitions
aliases_explicit.py:80:21: error[invalid-type-form] List literals are not allowed in this context in a type alias definition
aliases_explicit.py:81:21: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias definition
aliases_explicit.py:82:21: error[invalid-type-form] List comprehensions are not allowed in type alias definitions
aliases_explicit.py:83:21: error[invalid-type-form] Dict literals are not allowed in type alias definitions
aliases_explicit.py:84:21: error[invalid-type-form] Function calls are not allowed in type alias definitions
aliases_explicit.py:85:21: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias definitions
aliases_explicit.py:86:21: error[invalid-type-form] `if` expressions are not allowed in type alias definitions
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
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]`?
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]`?
aliases_explicit.py:90:22: error[invalid-type-form] Boolean operations are not allowed in type alias definitions
aliases_explicit.py:91:22: error[invalid-type-form] F-strings are not allowed in type alias definitions
aliases_explicit.py:100:5: error[not-subscriptable] Cannot subscript non-generic type `list[Unknown]`
aliases_explicit.py:101:6: error[call-non-callable] Object of type `UnionType` is not callable
aliases_explicit.py:102:5: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'list[Unknown] | set[Unknown]'>`
aliases_explicit.py:102:5: error[not-subscriptable] Cannot subscript non-generic type `list[Unknown] | set[Unknown]`
"""
39 changes: 17 additions & 22 deletions conformance/results/ty/aliases_implicit.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.
Falls short on full syntactic validation of type aliases.
"""
conformance_automated = "Pass"
errors_diff = """
Line 106: Expected 1 errors
Line 111: Expected 1 errors
Line 112: Expected 1 errors
Line 113: Expected 1 errors
Line 117: Expected 1 errors
"""
output = """
aliases_implicit.py:76:9: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'int | None'>`
aliases_implicit.py:77:9: error[not-subscriptable] Cannot subscript non-generic type `<class 'list[int | None]'>`
aliases_implicit.py:76:9: error[not-subscriptable] Cannot subscript non-generic type `int | None`
aliases_implicit.py:77:9: error[not-subscriptable] Cannot subscript non-generic type `list[int | None]`
aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `float` of type variable `TFloat@GoodTypeAlias12`
aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[<class 'int'> | <class 'str'>]` is not allowed in a parameter annotation
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
aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[<class 'int'>]` is not allowed in a parameter annotation
aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[str, str]` is not allowed in a parameter annotation
aliases_implicit.py:114:9: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a parameter annotation
aliases_implicit.py:115:10: error[invalid-type-form] Variable of type `Literal[True]` is not allowed in a parameter annotation
aliases_implicit.py:116:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a parameter annotation
aliases_implicit.py:118:10: error[invalid-type-form] Variable of type `Literal["int"]` is not allowed in a parameter annotation
aliases_implicit.py:106:9: error[invalid-type-form] Variable `BadTypeAlias1` cannot be used as a type
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
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
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
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
aliases_implicit.py:111:9: error[invalid-type-form] Variable `BadTypeAlias6` cannot be used as a type
aliases_implicit.py:112:9: error[invalid-type-form] Variable `BadTypeAlias7` cannot be used as a type
aliases_implicit.py:113:9: error[invalid-type-form] Variable `BadTypeAlias8` cannot be used as a type
aliases_implicit.py:114:9: error[invalid-type-form] Variable `BadTypeAlias9` cannot be used as a type
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
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
aliases_implicit.py:117:10: error[invalid-type-form] Variable `BadTypeAlias12` cannot be used as a type
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
aliases_implicit.py:119:10: error[invalid-type-form] Variable of type `Literal["int | str"]` is not allowed in a parameter annotation
aliases_implicit.py:133:6: error[call-non-callable] Object of type `UnionType` is not callable
aliases_implicit.py:135:5: error[not-subscriptable] Cannot subscript non-generic type `<types.UnionType special-form 'list[Unknown] | set[Unknown]'>`
aliases_implicit.py:135:5: error[not-subscriptable] Cannot subscript non-generic type `list[Unknown] | set[Unknown]`
"""
26 changes: 13 additions & 13 deletions conformance/results/ty/aliases_type_statement.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ aliases_type_statement.py:19:1: error[call-non-callable] Object of type `TypeAli
aliases_type_statement.py:23:7: error[unresolved-attribute] Object of type `TypeAliasType` has no attribute `other_attrib`
aliases_type_statement.py:26:18: error[invalid-base] Invalid class base with type `TypeAliasType`
aliases_type_statement.py:31:22: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `_ClassInfo`, found `TypeAliasType`
aliases_type_statement.py:37:22: error[invalid-type-form] Function calls are not allowed in type alias values
aliases_type_statement.py:38:22: error[invalid-type-form] List literals are not allowed in this context in a type alias value
aliases_type_statement.py:39:22: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias value
aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type alias values
aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type alias values
aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type alias values
aliases_type_statement.py:43:22: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias values
aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type alias values
aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type alias value
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]`?
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]`?
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type alias values
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type alias values
aliases_type_statement.py:37:22: error[invalid-type-form] Function calls are not allowed in type alias definitions
aliases_type_statement.py:38:22: error[invalid-type-form] List literals are not allowed in this context in a type alias definition
aliases_type_statement.py:39:22: error[invalid-type-form] Tuple literals are not allowed in this context in a type alias definition
aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type alias definitions
aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type alias definitions
aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type alias definitions
aliases_type_statement.py:43:22: error[invalid-type-form] Only simple names and dotted names can be subscripted in type alias definitions
aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type alias definitions
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
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]`?
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]`?
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type alias definitions
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type alias definitions
aliases_type_statement.py:53:23: error[unbound-type-variable] Type variable `V` is not bound to any outer generic context
aliases_type_statement.py:58:17: error[unbound-type-variable] Type variable `T1` is not bound to any outer generic context
aliases_type_statement.py:68:27: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int` of type variable `S@RecursiveTypeAlias2`
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/ty/aliases_typealiastype.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ aliases_typealiastype.py:56:42: error[invalid-type-form] Dict literals are not a
aliases_typealiastype.py:57:42: error[invalid-type-form] Function calls are not allowed in type expressions
aliases_typealiastype.py:58:42: error[invalid-type-form] Only simple names and dotted names can be subscripted in type expressions
aliases_typealiastype.py:59:42: error[invalid-type-form] `if` expressions are not allowed in type expressions
aliases_typealiastype.py:60:42: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
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
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]`?
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]`?
aliases_typealiastype.py:63:42: error[invalid-type-form] Boolean operations are not allowed in type expressions
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/ty/annotations_forward_refs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ annotations_forward_refs.py:45:10: error[invalid-type-form] Dict literals are no
annotations_forward_refs.py:46:10: error[invalid-type-form] Function calls are not allowed in parameter annotations
annotations_forward_refs.py:47:10: error[invalid-type-form] Only simple names and dotted names can be subscripted in parameter annotations
annotations_forward_refs.py:48:10: error[invalid-type-form] `if` expressions are not allowed in parameter annotations
annotations_forward_refs.py:49:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a parameter annotation
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
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]`?
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]`?
annotations_forward_refs.py:52:11: error[invalid-type-form] Unary operations are not allowed in parameter annotations
Expand Down
Loading
Loading