forked from python/typing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannotations_forward_refs.toml
More file actions
38 lines (38 loc) · 2.79 KB
/
Copy pathannotations_forward_refs.toml
File metadata and controls
38 lines (38 loc) · 2.79 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
conformant = "Partial"
notes = """
Does not report error for a forward reference that is not enclosed in quotes.
Does not report error for use of quoted type with "|" operator (runtime error).
Incorrectly generates error for quoted type defined in class scope.
"""
output = """
annotations_forward_refs.py:41: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:42: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:43: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:44: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:45: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:46: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:47: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:48: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:49: error: Variable "annotations_forward_refs.var1" is not valid as a type [valid-type]
annotations_forward_refs.py:49: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
annotations_forward_refs.py:50: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:51: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:52: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:53: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:54: error: Invalid type comment or annotation [valid-type]
annotations_forward_refs.py:55: error: Module "types" is not valid as a type [valid-type]
annotations_forward_refs.py:55: note: Perhaps you meant to use a protocol matching the module structure?
annotations_forward_refs.py:80: error: Name "ClassF" is not defined [name-defined]
annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]
annotations_forward_refs.py:87: note: Perhaps you need "Callable[...]" or a callback protocol?
annotations_forward_refs.py:89: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]
annotations_forward_refs.py:89: note: Perhaps you need "Callable[...]" or a callback protocol?
annotations_forward_refs.py:96: error: Expression is of type int?, not "int" [assert-type]
"""
conformance_automated = "Fail"
errors_diff = """
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 87: Unexpected errors ['annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]']
Line 96: Unexpected errors ['annotations_forward_refs.py:96: error: Expression is of type int?, not "int" [assert-type]']
"""