|
1 |
| -conformant = "Unsupported" |
| 1 | +conformant = "Partial" |
2 | 2 | notes = """
|
3 |
| -Does not support `type` statement. |
| 3 | +Does not reject use of TypeAliasType as base class. |
| 4 | +Does not reject redefinition of type alias defined with type statement. |
| 5 | +Does not reject type alias defined in function scope. |
| 6 | +Does not reject type alias with circular definition. |
4 | 7 | """
|
5 | 8 | output = """
|
6 |
| -aliases_type_statement.py: error: Cannot assign multiple types to name "BadTypeAlias14" without an explicit "Type[...]" annotation [misc] |
7 |
| -aliases_type_statement.py:8: error: PEP 695 type aliases are not yet supported [valid-type] |
8 |
| -aliases_type_statement.py:9: error: PEP 695 type aliases are not yet supported [valid-type] |
9 |
| -aliases_type_statement.py:9: error: Name "S3" is not defined [name-defined] |
10 |
| -aliases_type_statement.py:9: error: Name "S1" is not defined [name-defined] |
11 |
| -aliases_type_statement.py:9: error: Name "S2" is not defined [name-defined] |
12 |
| -aliases_type_statement.py:10: error: PEP 695 type aliases are not yet supported [valid-type] |
13 |
| -aliases_type_statement.py:10: error: Value of type "UnionType" is not indexable [index] |
14 |
| -aliases_type_statement.py:14: error: PEP 695 type aliases are not yet supported [valid-type] |
15 |
| -aliases_type_statement.py:21: error: "type[int]" has no attribute "__value__" [attr-defined] |
16 |
| -aliases_type_statement.py:23: error: "type[int]" has no attribute "other_attrib" [attr-defined] |
17 |
| -aliases_type_statement.py:37: error: PEP 695 type aliases are not yet supported [valid-type] |
18 |
| -aliases_type_statement.py:38: error: PEP 695 type aliases are not yet supported [valid-type] |
19 |
| -aliases_type_statement.py:39: error: PEP 695 type aliases are not yet supported [valid-type] |
20 |
| -aliases_type_statement.py:40: error: PEP 695 type aliases are not yet supported [valid-type] |
21 |
| -aliases_type_statement.py:41: error: PEP 695 type aliases are not yet supported [valid-type] |
22 |
| -aliases_type_statement.py:42: error: PEP 695 type aliases are not yet supported [valid-type] |
23 |
| -aliases_type_statement.py:43: error: PEP 695 type aliases are not yet supported [valid-type] |
24 |
| -aliases_type_statement.py:44: error: PEP 695 type aliases are not yet supported [valid-type] |
25 |
| -aliases_type_statement.py:45: error: PEP 695 type aliases are not yet supported [valid-type] |
26 |
| -aliases_type_statement.py:46: error: PEP 695 type aliases are not yet supported [valid-type] |
27 |
| -aliases_type_statement.py:47: error: PEP 695 type aliases are not yet supported [valid-type] |
28 |
| -aliases_type_statement.py:48: error: PEP 695 type aliases are not yet supported [valid-type] |
29 |
| -aliases_type_statement.py:48: error: Function "list" could always be true in boolean context [truthy-function] |
30 |
| -aliases_type_statement.py:49: error: PEP 695 type aliases are not yet supported [valid-type] |
31 |
| -aliases_type_statement.py:52: error: PEP 695 type aliases are not yet supported [valid-type] |
32 |
| -aliases_type_statement.py:54: error: PEP 695 type aliases are not yet supported [valid-type] |
33 |
| -aliases_type_statement.py:58: error: PEP 695 type aliases are not yet supported [valid-type] |
34 |
| -aliases_type_statement.py:64: error: PEP 695 type aliases are not yet supported [valid-type] |
35 |
| -aliases_type_statement.py:64: error: Name "K" is not defined [name-defined] |
36 |
| -aliases_type_statement.py:69: error: PEP 695 type aliases are not yet supported [valid-type] |
37 |
| -aliases_type_statement.py:72: error: PEP 695 type aliases are not yet supported [valid-type] |
38 |
| -aliases_type_statement.py:72: error: Name "T" is not defined [name-defined] |
39 |
| -aliases_type_statement.py:72: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type] |
40 |
| -aliases_type_statement.py:72: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
41 |
| -aliases_type_statement.py:74: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type] |
42 |
| -aliases_type_statement.py:74: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
43 |
| -aliases_type_statement.py:75: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type] |
44 |
| -aliases_type_statement.py:75: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
45 |
| -aliases_type_statement.py:77: error: PEP 695 type aliases are not yet supported [valid-type] |
46 |
| -aliases_type_statement.py:77: error: Name "P" is not defined [name-defined] |
47 |
| -aliases_type_statement.py:77: error: Name "T" is not defined [name-defined] |
48 |
| -aliases_type_statement.py:77: error: Name "S" is not defined [name-defined] |
49 |
| -aliases_type_statement.py:77: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type] |
50 |
| -aliases_type_statement.py:77: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
51 |
| -aliases_type_statement.py:79: error: Unexpected "..." [misc] |
52 |
| -aliases_type_statement.py:79: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type] |
53 |
| -aliases_type_statement.py:79: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
54 |
| -aliases_type_statement.py:80: error: Unexpected "..." [misc] |
55 |
| -aliases_type_statement.py:80: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type] |
56 |
| -aliases_type_statement.py:80: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
57 |
| -aliases_type_statement.py:81: error: Unexpected "..." [misc] |
58 |
| -aliases_type_statement.py:81: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type] |
59 |
| -aliases_type_statement.py:81: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
60 |
| -aliases_type_statement.py:82: error: Bracketed expression "[...]" is not valid as a type [valid-type] |
61 |
| -aliases_type_statement.py:82: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type] |
62 |
| -aliases_type_statement.py:82: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
63 |
| -aliases_type_statement.py:84: error: PEP 695 type aliases are not yet supported [valid-type] |
64 |
| -aliases_type_statement.py:84: error: Name "RecursiveTypeAlias3" is not defined [name-defined] |
65 |
| -aliases_type_statement.py:86: error: PEP 695 type aliases are not yet supported [valid-type] |
66 |
| -aliases_type_statement.py:86: error: Name "T" is not defined [name-defined] |
67 |
| -aliases_type_statement.py:86: error: Cannot determine type of "RecursiveTypeAlias4" [has-type] |
68 |
| -aliases_type_statement.py:88: error: PEP 695 type aliases are not yet supported [valid-type] |
69 |
| -aliases_type_statement.py:88: error: Name "T" is not defined [name-defined] |
70 |
| -aliases_type_statement.py:88: error: Variable "aliases_type_statement.RecursiveTypeAlias5" is not valid as a type [valid-type] |
71 |
| -aliases_type_statement.py:88: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
72 |
| -aliases_type_statement.py:90: error: PEP 695 type aliases are not yet supported [valid-type] |
| 9 | +aliases_type_statement.py:17: error: "TypeAliasType" has no attribute "bit_count" [attr-defined] |
| 10 | +aliases_type_statement.py:19: error: "TypeAliasType" not callable [operator] |
| 11 | +aliases_type_statement.py:23: error: "TypeAliasType" has no attribute "other_attrib" [attr-defined] |
| 12 | +aliases_type_statement.py:31: error: Parameterized generics cannot be used with class or instance checks [misc] |
| 13 | +aliases_type_statement.py:31: error: Argument 2 to "isinstance" has incompatible type "TypeAliasType"; expected "_ClassInfo" [arg-type] |
| 14 | +aliases_type_statement.py:37: error: Invalid type alias: expression is not a valid type [valid-type] |
| 15 | +aliases_type_statement.py:38: error: Bracketed expression "[...]" is not valid as a type [valid-type] |
| 16 | +aliases_type_statement.py:39: error: Invalid type alias: expression is not a valid type [valid-type] |
| 17 | +aliases_type_statement.py:40: error: Invalid type alias: expression is not a valid type [valid-type] |
| 18 | +aliases_type_statement.py:41: error: Invalid type alias: expression is not a valid type [valid-type] |
| 19 | +aliases_type_statement.py:42: error: Invalid type alias: expression is not a valid type [valid-type] |
| 20 | +aliases_type_statement.py:43: error: Invalid type alias: expression is not a valid type [valid-type] |
| 21 | +aliases_type_statement.py:44: error: Invalid type alias: expression is not a valid type [valid-type] |
| 22 | +aliases_type_statement.py:45: error: Variable "aliases_type_statement.var1" is not valid as a type [valid-type] |
| 23 | +aliases_type_statement.py:45: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases |
| 24 | +aliases_type_statement.py:46: error: Invalid type: try using Literal[True] instead? [valid-type] |
| 25 | +aliases_type_statement.py:47: error: Invalid type: try using Literal[1] instead? [valid-type] |
| 26 | +aliases_type_statement.py:48: error: Invalid type alias: expression is not a valid type [valid-type] |
| 27 | +aliases_type_statement.py:49: error: Invalid type alias: expression is not a valid type [valid-type] |
| 28 | +aliases_type_statement.py:54: error: Name "BadTypeAlias14" already defined on line 52 [no-redef] |
| 29 | +aliases_type_statement.py:64: error: All type parameters should be declared ("V" not declared) [valid-type] |
| 30 | +aliases_type_statement.py:69: error: All type parameters should be declared ("T1" not declared) [valid-type] |
| 31 | +aliases_type_statement.py:79: error: Type argument "str" of "RecursiveTypeAlias2" must be a subtype of "int" [type-var] |
| 32 | +aliases_type_statement.py:81: error: Type argument "int" of "RecursiveTypeAlias2" must be a subtype of "str" [type-var] |
| 33 | +aliases_type_statement.py:84: error: Cannot resolve name "RecursiveTypeAlias3" (possible cyclic definition) [misc] |
| 34 | +aliases_type_statement.py:86: error: Invalid recursive alias: a union item of itself [misc] |
| 35 | +aliases_type_statement.py:90: error: Cannot resolve name "RecursiveTypeAlias6" (possible cyclic definition) [misc] |
73 | 36 | aliases_type_statement.py:90: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc]
|
74 |
| -aliases_type_statement.py:90: error: Name "RecursiveTypeAlias7" is used before definition [used-before-def] |
75 |
| -aliases_type_statement.py:91: error: PEP 695 type aliases are not yet supported [valid-type] |
| 37 | +aliases_type_statement.py:91: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] |
76 | 38 | """
|
77 | 39 | conformance_automated = "Fail"
|
78 | 40 | errors_diff = """
|
79 |
| -Line 17: Expected 1 errors |
80 |
| -Line 19: Expected 1 errors |
81 | 41 | Line 26: Expected 1 errors
|
82 |
| -Line 31: Expected 1 errors |
83 |
| -Line 8: Unexpected errors ['aliases_type_statement.py:8: error: PEP 695 type aliases are not yet supported [valid-type]'] |
84 |
| -Line 9: Unexpected errors ['aliases_type_statement.py:9: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:9: error: Name "S3" is not defined [name-defined]', 'aliases_type_statement.py:9: error: Name "S1" is not defined [name-defined]', 'aliases_type_statement.py:9: error: Name "S2" is not defined [name-defined]'] |
85 |
| -Line 10: Unexpected errors ['aliases_type_statement.py:10: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:10: error: Value of type "UnionType" is not indexable [index]'] |
86 |
| -Line 14: Unexpected errors ['aliases_type_statement.py:14: error: PEP 695 type aliases are not yet supported [valid-type]'] |
87 |
| -Line 21: Unexpected errors ['aliases_type_statement.py:21: error: "type[int]" has no attribute "__value__" [attr-defined]'] |
88 |
| -Line 54: Unexpected errors ['aliases_type_statement.py:54: error: PEP 695 type aliases are not yet supported [valid-type]'] |
89 |
| -Line 72: Unexpected errors ['aliases_type_statement.py:72: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:72: error: Name "T" is not defined [name-defined]', 'aliases_type_statement.py:72: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type]'] |
90 |
| -Line 74: Unexpected errors ['aliases_type_statement.py:74: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type]'] |
91 |
| -Line 75: Unexpected errors ['aliases_type_statement.py:75: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type]'] |
92 |
| -Line 77: Unexpected errors ['aliases_type_statement.py:77: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:77: error: Name "P" is not defined [name-defined]', 'aliases_type_statement.py:77: error: Name "T" is not defined [name-defined]', 'aliases_type_statement.py:77: error: Name "S" is not defined [name-defined]', 'aliases_type_statement.py:77: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] |
93 |
| -Line 80: Unexpected errors ['aliases_type_statement.py:80: error: Unexpected "..." [misc]', 'aliases_type_statement.py:80: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] |
94 |
| -Line 82: Unexpected errors ['aliases_type_statement.py:82: error: Bracketed expression "[...]" is not valid as a type [valid-type]', 'aliases_type_statement.py:82: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] |
95 |
| -Line 88: Unexpected errors ['aliases_type_statement.py:88: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:88: error: Name "T" is not defined [name-defined]', 'aliases_type_statement.py:88: error: Variable "aliases_type_statement.RecursiveTypeAlias5" is not valid as a type [valid-type]'] |
96 |
| -Line 91: Unexpected errors ['aliases_type_statement.py:91: error: PEP 695 type aliases are not yet supported [valid-type]'] |
| 42 | +Line 52: Expected 1 errors |
| 43 | +Line 58: Expected 1 errors |
| 44 | +Line 54: Unexpected errors ['aliases_type_statement.py:54: error: Name "BadTypeAlias14" already defined on line 52 [no-redef]'] |
| 45 | +Line 91: Unexpected errors ['aliases_type_statement.py:91: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc]'] |
97 | 46 | """
|
0 commit comments