|
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" |
7 | 2 | 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 |
13 | 3 | """ |
14 | 4 | 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]` |
17 | 7 | aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2 |
18 | 8 | aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2 |
19 | 9 | aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...` |
20 | 10 | 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 |
29 | 24 | aliases_implicit.py:119:10: error[invalid-type-form] Variable of type `Literal["int | str"]` is not allowed in a parameter annotation |
30 | 25 | 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]` |
32 | 27 | """ |
0 commit comments