You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: conformance/results/mypy/generics_defaults_referential.toml
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -3,20 +3,18 @@ notes = """
3
3
Does not correctly handle defaults referencing other `TypeVar`s.
4
4
"""
5
5
output = """
6
-
generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type]
7
-
generics_defaults_referential.py:38: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type]
8
-
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]
9
-
generics_defaults_referential.py:61: error: Type variable S1 referenced in the default of S2 is unbound [misc]
10
-
generics_defaults_referential.py:75: error: TypeVar default must be one of the constraint types [misc]
6
+
generics_defaults_referential.py:37: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type]
7
+
generics_defaults_referential.py:53: error: Type parameter "Start2T" has a default type that refers to one or more type variables that are out of scope [misc]
8
+
generics_defaults_referential.py:60: error: Type variable S1 referenced in the default of S2 is unbound [misc]
9
+
generics_defaults_referential.py:74: error: TypeVar default must be one of the constraint types [misc]
10
+
generics_defaults_referential.py:77: error: TypeVar default must be one of the constraint types [misc]
11
11
generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types [misc]
12
-
generics_defaults_referential.py:79: error: TypeVar default must be one of the constraint types [misc]
13
-
generics_defaults_referential.py:104: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]
12
+
generics_defaults_referential.py:103: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]
14
13
"""
15
14
conformance_automated = "Fail"
16
15
errors_diff = """
17
-
Line 37: Expected 1 errors
18
-
Line 69: Expected 1 errors
19
-
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]']
20
-
Line 78: Unexpected errors ['generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types [misc]']
21
-
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]']
16
+
Line 36: Expected 1 errors
17
+
Line 68: Expected 1 errors
18
+
Line 77: Unexpected errors ['generics_defaults_referential.py:77: error: TypeVar default must be one of the constraint types [misc]']
19
+
Line 103: Unexpected errors ['generics_defaults_referential.py:103: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]']
Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"]
21
19
"""
22
20
output = """
23
-
./aliases_implicit.py:68:16: .GoodTypeAlias9[<list containing [str, str]>, None] = (int, /, ****P) -> ~R is not equivalent to (int, str, str, /) -> None
24
21
./aliases_implicit.py:70:16: Any[from_another] is not equivalent to int | str | list[list[int]] | None
25
-
./aliases_implicit.py:72:16: .GoodTypeAlias13 = (**__P: **P) -> None is not equivalent to (...) -> None
Copy file name to clipboardExpand all lines: conformance/results/pycroscope/aliases_type_statement.toml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
conformant = "Partial"
2
2
notes = """
3
3
Fails to reject various weird annotations.
4
+
Rejects a valid recursive generic type alias.
4
5
"""
5
6
conformance_automated = "Fail"
6
7
errors_diff = """
@@ -16,6 +17,7 @@ Line 45: Expected 1 errors
16
17
Line 46: Expected 1 errors
17
18
Line 47: Expected 1 errors
18
19
Line 49: Expected 1 errors
20
+
Line 61: Unexpected errors ['./aliases_type_statement.py:61:0: Unrecognized annotation typing._SpecialForm [invalid_annotation]']
19
21
"""
20
22
output = """
21
23
./aliases_type_statement.py:17:0: typing.TypeAliasType has no attribute 'bit_count' [undefined_attribute]
@@ -26,6 +28,7 @@ output = """
26
28
./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]
27
29
./aliases_type_statement.py:53:22: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_type_alias]
28
30
./aliases_type_statement.py:58:16: Type alias must declare type parameters in the type statement [invalid_type_alias]
./callables_protocol.py:186:4: Incompatible types in assignment to attribute 'other_attribute': expected int, got Literal['str'] [incompatible_assignment]
23
16
./callables_protocol.py:187:4: ./callables_protocol.py.Proto9[**P@./callables_protocol.py.decorator1.<locals>.decorator1, +R@./callables_protocol.py.decorator1.<locals>.decorator1] has no attribute 'xxx' [undefined_attribute]
24
17
./callables_protocol.py:197:6: ./callables_protocol.py.Proto9[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute]
0 commit comments