forked from python/typing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerics_self_advanced.toml
More file actions
20 lines (20 loc) · 1.28 KB
/
generics_self_advanced.toml
File metadata and controls
20 lines (20 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
conformant = "Partial"
notes = """
Does not infer the type of an unannotated `self` parameter to be type `Self`.
Does not retain `Self` when calling method that returns `Self`.
Does not infer the type of an unannotated `cls` parameter to be type `type[Self]`.
Does not retain `Self` when accessing attribute through `type[Self]`.
"""
output = """
generics_self_advanced.py:35: error: Expression is of type "ChildB", not "Self" [assert-type]
generics_self_advanced.py:41: error: Expression is of type "ChildB", not "Self" [assert-type]
generics_self_advanced.py:45: error: Expression is of type "type[ChildB]", not "type[Self]" [assert-type]
generics_self_advanced.py:51: error: Expression is of type "ChildB", not "Self" [assert-type]
"""
conformance_automated = "Fail"
errors_diff = """
Line 35: Unexpected errors ['generics_self_advanced.py:35: error: Expression is of type "ChildB", not "Self" [assert-type]']
Line 41: Unexpected errors ['generics_self_advanced.py:41: error: Expression is of type "ChildB", not "Self" [assert-type]']
Line 45: Unexpected errors ['generics_self_advanced.py:45: error: Expression is of type "type[ChildB]", not "type[Self]" [assert-type]']
Line 51: Unexpected errors ['generics_self_advanced.py:51: error: Expression is of type "ChildB", not "Self" [assert-type]']
"""