-
Notifications
You must be signed in to change notification settings - Fork 293
Expand file tree
/
Copy pathannotations_forward_refs.toml
More file actions
40 lines (40 loc) · 4.06 KB
/
annotations_forward_refs.toml
File metadata and controls
40 lines (40 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Resolves references in type annotations as referring to end-of-scope types (https://discuss.python.org/t/annotation-string-references-in-class-scope-in-conformance-tests/105439, https://github.com/python/typing/pull/2144)
"""
errors_diff = """
Line 82: Unexpected errors ['annotations_forward_refs.py:82:11: error[invalid-type-form] Variable of type `Literal[""]` is not allowed in a type expression']
Line 87: Unexpected errors ['annotations_forward_refs.py:87:9: error[invalid-type-form] Function `int` is not valid in a type expression']
Line 95: Unexpected errors ['annotations_forward_refs.py:95:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `str`']
Line 96: Unexpected errors ['annotations_forward_refs.py:96:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `int`']
"""
output = """
annotations_forward_refs.py:22:7: error[unresolved-reference] Name `ClassA` used when not defined
annotations_forward_refs.py:23:12: error[unresolved-reference] Name `ClassA` used when not defined
annotations_forward_refs.py:24:7: error[unsupported-operator] Operator `|` is unsupported between objects of type `Literal["ClassA"]` and `<class 'int'>`
annotations_forward_refs.py:25:7: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `Literal["ClassA"]`
annotations_forward_refs.py:41:10: error[invalid-type-form] Function calls are not allowed in type expressions
annotations_forward_refs.py:42:10: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
annotations_forward_refs.py:43:10: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
annotations_forward_refs.py:44:10: error[invalid-type-form] List comprehensions are not allowed in type expressions
annotations_forward_refs.py:45:10: error[invalid-type-form] Dict literals are not allowed in type expressions
annotations_forward_refs.py:46:10: error[invalid-type-form] Function calls are not allowed in type expressions
annotations_forward_refs.py:47:10: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'>]` in type expression
annotations_forward_refs.py:47:16: error[invalid-type-form] Int literals are not allowed in this context in a type expression
annotations_forward_refs.py:48:10: error[invalid-type-form] `if` expressions are not allowed in type expressions
annotations_forward_refs.py:49:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
annotations_forward_refs.py:50:11: error[invalid-type-form] Boolean literals are not allowed in this context in a type expression
annotations_forward_refs.py:51:11: error[invalid-type-form] Int literals are not allowed in this context in a type expression
annotations_forward_refs.py:52:11: error[invalid-type-form] Unary operations are not allowed in type expressions
annotations_forward_refs.py:53:11: error[invalid-type-form] Boolean operations are not allowed in type expressions
annotations_forward_refs.py:54:11: error[fstring-type-annotation] Type expressions cannot use f-strings
annotations_forward_refs.py:55:11: error[invalid-type-form] Module `types` is not valid in a type expression
annotations_forward_refs.py:66:26: error[unresolved-reference] Name `ClassB` used when not defined
annotations_forward_refs.py:80:14: error[unresolved-reference] Name `ClassF` used when not defined
annotations_forward_refs.py:82:11: error[invalid-type-form] Variable of type `Literal[""]` is not allowed in a type expression
annotations_forward_refs.py:87:9: error[invalid-type-form] Function `int` is not valid in a type expression
annotations_forward_refs.py:89:8: error[invalid-type-form] Function `int` is not valid in a type expression
annotations_forward_refs.py:95:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `str`
annotations_forward_refs.py:96:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `int`
"""