forked from python/typing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerics_defaults_referential.toml
More file actions
22 lines (22 loc) · 1.67 KB
/
generics_defaults_referential.toml
File metadata and controls
22 lines (22 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
conformant = "Partial"
notes = """
Does not correctly handle defaults referencing other TypeVars.
"""
output = """
generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type]
generics_defaults_referential.py:38: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type]
generics_defaults_referential.py:54: error: Type parameter "Start2T" has a default type that refers to one or more type variables that are out of scope [misc]
generics_defaults_referential.py:61: error: Type variable S1 referenced in the default of S2 is unbound [misc]
generics_defaults_referential.py:75: error: TypeVar default must be one of the constraint types [misc]
generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types [misc]
generics_defaults_referential.py:79: error: TypeVar default must be one of the constraint types [misc]
generics_defaults_referential.py:104: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]
"""
conformance_automated = "Fail"
errors_diff = """
Line 37: Expected 1 errors
Line 69: Expected 1 errors
Line 23: Unexpected errors ['generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type]']
Line 78: Unexpected errors ['generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types [misc]']
Line 104: Unexpected errors ['generics_defaults_referential.py:104: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]']
"""