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
Line 15: Unexpected errors ['generics_typevartuple_variance.py:15: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]']
9
+
Line 27: Unexpected errors ['generics_typevartuple_variance.py:27: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]']
10
+
Line 39: Unexpected errors ['generics_typevartuple_variance.py:39: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]']
11
+
Line 41: Unexpected errors ['generics_typevartuple_variance.py:41: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]']
12
+
"""
13
+
output = """
14
+
generics_typevartuple_variance.py:15: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]
15
+
generics_typevartuple_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[object]", variable has type "CovariantTypeVarTuple[int]") [assignment]
16
+
generics_typevartuple_variance.py:27: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]
17
+
generics_typevartuple_variance.py:39: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]
18
+
generics_typevartuple_variance.py:41: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]
19
+
generics_typevartuple_variance.py:52: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[object]", variable has type "CovariantTypeVarTupleOld[int]") [assignment]
Copy file name to clipboardExpand all lines: conformance/results/pyrefly/generics_typevartuple_basic.toml
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ ERROR generics_typevartuple_basic.py:52:22-27: `TypeVarTuple` must be unpacked [
10
10
ERROR generics_typevartuple_basic.py:53:37-42: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
11
11
ERROR generics_typevartuple_basic.py:56:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
12
12
ERROR generics_typevartuple_basic.py:59:24-29: `TypeVarTuple` must be unpacked [invalid-annotation]
13
-
ERROR generics_typevartuple_basic.py:65:27-41: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
14
-
ERROR generics_typevartuple_basic.py:66:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
15
-
ERROR generics_typevartuple_basic.py:67:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple]
16
-
ERROR generics_typevartuple_basic.py:91:15-19: Argument `tuple[Literal[0]]` is not assignable to parameter `arg2` with type `tuple[int, int]` in function `func2` [bad-argument-type]
17
-
ERROR generics_typevartuple_basic.py:100:17-18: Argument `Array[Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type]
18
-
ERROR generics_typevartuple_basic.py:101:17-18: Argument `Array[Height, Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type]
19
-
ERROR generics_typevartuple_basic.py:107:7-13: Type parameters for class may not have more than one TypeVarTuple [invalid-type-var-tuple]
13
+
ERROR generics_typevartuple_basic.py:65:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
14
+
ERROR generics_typevartuple_basic.py:66:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple]
15
+
ERROR generics_typevartuple_basic.py:90:15-19: Argument `tuple[Literal[0]]` is not assignable to parameter `arg2` with type `tuple[int, int]` in function `func2` [bad-argument-type]
16
+
ERROR generics_typevartuple_basic.py:99:17-18: Argument `Array[Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type]
17
+
ERROR generics_typevartuple_basic.py:100:17-18: Argument `Array[Height, Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type]
18
+
ERROR generics_typevartuple_basic.py:106:22-26: Expected a type form, got instance of `*Unknown` [not-a-type]
19
+
ERROR generics_typevartuple_basic.py:106:23-26: Could not find name `Ts1` [unknown-name]
Line 15: Unexpected errors ['`ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]']
7
+
Line 24: Unexpected errors ['`CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]']
8
+
Line 27: Unexpected errors ['Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]']
9
+
Line 39: Unexpected errors ['`ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]']
10
+
Line 41: Unexpected errors ['Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]']
11
+
Line 53: Unexpected errors ['`CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]']
12
+
"""
13
+
output = """
14
+
ERROR generics_typevartuple_variance.py:14:45-77: `ContravariantTypeVarTuple[int]` is not assignable to `ContravariantTypeVarTuple[object]` [bad-assignment]
15
+
ERROR generics_typevartuple_variance.py:15:42-77: `ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]
16
+
ERROR generics_typevartuple_variance.py:23:39-70: `CovariantTypeVarTuple[object]` is not assignable to `CovariantTypeVarTuple[int]` [bad-assignment]
17
+
ERROR generics_typevartuple_variance.py:24:42-70: `CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]
18
+
ERROR generics_typevartuple_variance.py:27:29-47: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
19
+
ERROR generics_typevartuple_variance.py:38:52-87: `ContravariantTypeVarTupleOld[int]` is not assignable to `ContravariantTypeVarTupleOld[object]` [bad-assignment]
20
+
ERROR generics_typevartuple_variance.py:39:49-87: `ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]
21
+
ERROR generics_typevartuple_variance.py:41:31-45: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
22
+
ERROR generics_typevartuple_variance.py:52:46-80: `CovariantTypeVarTupleOld[object]` is not assignable to `CovariantTypeVarTupleOld[int]` [bad-assignment]
23
+
ERROR generics_typevartuple_variance.py:53:49-80: `CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]
Copy file name to clipboardExpand all lines: conformance/results/pyright/generics_typevartuple_basic.toml
+10-11Lines changed: 10 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Does not correctly solve TypeVarTuple with heterogeneous bounds.
4
4
"""
5
5
conformance_automated = "Fail"
6
6
errors_diff = """
7
-
Line 90: Unexpected errors ['generics_typevartuple_basic.py:90:14 - error: Argument of type "tuple[Literal[\\'0\\']]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"']
7
+
Line 89: Unexpected errors ['generics_typevartuple_basic.py:89:14 - error: Argument of type "tuple[Literal[\\'0\\']]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"']
8
8
"""
9
9
output = """
10
10
generics_typevartuple_basic.py:42:34 - error: Argument of type "Height" cannot be assigned to parameter "shape" of type "tuple[*Shape@Array]" in function "__init__"
generics_typevartuple_basic.py:53:37 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape (reportInvalidTypeForm)
20
20
generics_typevartuple_basic.py:56:34 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape (reportInvalidTypeForm)
21
21
generics_typevartuple_basic.py:59:24 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape (reportInvalidTypeForm)
22
-
generics_typevartuple_basic.py:65:27 - error: "covariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)
23
-
generics_typevartuple_basic.py:66:27 - error: TypeVarTuple cannot have value constraints (reportGeneralTypeIssues)
24
-
generics_typevartuple_basic.py:66:32 - error: TypeVarTuple cannot have value constraints (reportGeneralTypeIssues)
25
-
generics_typevartuple_basic.py:67:27 - error: "bound" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)
26
-
generics_typevartuple_basic.py:90:14 - error: Argument of type "tuple[Literal['0']]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"
22
+
generics_typevartuple_basic.py:65:27 - error: TypeVarTuple cannot have value constraints (reportGeneralTypeIssues)
23
+
generics_typevartuple_basic.py:65:32 - error: TypeVarTuple cannot have value constraints (reportGeneralTypeIssues)
24
+
generics_typevartuple_basic.py:66:27 - error: "bound" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)
25
+
generics_typevartuple_basic.py:89:14 - error: Argument of type "tuple[Literal['0']]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"
27
26
"Literal['0']" is not assignable to "int" (reportArgumentType)
28
-
generics_typevartuple_basic.py:91:15 - error: Argument of type "tuple[Literal[0]]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"
27
+
generics_typevartuple_basic.py:90:15 - error: Argument of type "tuple[Literal[0]]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"
29
28
"tuple[Literal[0]]" is not assignable to "tuple[int, int]"
30
29
Tuple size mismatch; expected 2 but received 1 (reportArgumentType)
31
-
generics_typevartuple_basic.py:100:17 - error: Argument of type "Array[Width]" cannot be assigned to parameter "y" of type "Array[*Shape@multiply]" in function "multiply"
30
+
generics_typevartuple_basic.py:99:17 - error: Argument of type "Array[Width]" cannot be assigned to parameter "y" of type "Array[*Shape@multiply]" in function "multiply"
32
31
"Array[Width]" is not assignable to "Array[Height]"
33
32
Type parameter "Shape@Array" is invariant, but "*tuple[Width]" is not the same as "*tuple[Height]" (reportArgumentType)
34
-
generics_typevartuple_basic.py:101:17 - error: Argument of type "Array[Height, Width]" cannot be assigned to parameter "y" of type "Array[*Shape@multiply]" in function "multiply"
33
+
generics_typevartuple_basic.py:100:17 - error: Argument of type "Array[Height, Width]" cannot be assigned to parameter "y" of type "Array[*Shape@multiply]" in function "multiply"
35
34
"Array[Height, Width]" is not assignable to "Array[Height]"
36
35
Type parameter "Shape@Array" is invariant, but "*tuple[Height, Width]" is not the same as "*tuple[Height]" (reportArgumentType)
37
-
generics_typevartuple_basic.py:107:14 - error: Generic class can have at most one TypeVarTuple type parameter but received multiple ("Ts1", "Ts2") (reportGeneralTypeIssues)
38
-
generics_typevartuple_basic.py:107:29 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple (reportInvalidTypeForm)
36
+
generics_typevartuple_basic.py:106:23 - error: "Ts1" is not defined (reportUndefinedVariable)
37
+
generics_typevartuple_basic.py:106:23 - error: Type argument for "Generic" must be a type variable (reportInvalidTypeForm)
Line 15: Unexpected errors ['generics_typevartuple_variance.py:15:42 - error: Type "ContravariantTypeVarTuple[object]" is not assignable to declared type "ContravariantTypeVarTuple[int]"']
7
+
Line 24: Unexpected errors ['generics_typevartuple_variance.py:24:42 - error: Type "CovariantTypeVarTuple[int]" is not assignable to declared type "CovariantTypeVarTuple[object]"']
8
+
Line 27: Unexpected errors ['generics_typevartuple_variance.py:27:29 - error: "contravariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)']
9
+
Line 39: Unexpected errors ['generics_typevartuple_variance.py:39:49 - error: Type "ContravariantTypeVarTupleOld[object]" is not assignable to declared type "ContravariantTypeVarTupleOld[int]"']
10
+
Line 41: Unexpected errors ['generics_typevartuple_variance.py:41:31 - error: "covariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)']
11
+
Line 53: Unexpected errors ['generics_typevartuple_variance.py:53:49 - error: Type "CovariantTypeVarTupleOld[int]" is not assignable to declared type "CovariantTypeVarTupleOld[object]"']
12
+
"""
13
+
output = """
14
+
generics_typevartuple_variance.py:14:45 - error: Type "ContravariantTypeVarTuple[int]" is not assignable to declared type "ContravariantTypeVarTuple[object]"
15
+
"ContravariantTypeVarTuple[int]" is not assignable to "ContravariantTypeVarTuple[object]"
16
+
Type parameter "InTs@ContravariantTypeVarTuple" is invariant, but "*tuple[int]" is not the same as "*tuple[object]" (reportAssignmentType)
17
+
generics_typevartuple_variance.py:15:42 - error: Type "ContravariantTypeVarTuple[object]" is not assignable to declared type "ContravariantTypeVarTuple[int]"
18
+
"ContravariantTypeVarTuple[object]" is not assignable to "ContravariantTypeVarTuple[int]"
19
+
Type parameter "InTs@ContravariantTypeVarTuple" is invariant, but "*tuple[object]" is not the same as "*tuple[int]" (reportAssignmentType)
20
+
generics_typevartuple_variance.py:23:39 - error: Type "CovariantTypeVarTuple[object]" is not assignable to declared type "CovariantTypeVarTuple[int]"
21
+
"CovariantTypeVarTuple[object]" is not assignable to "CovariantTypeVarTuple[int]"
22
+
Type parameter "OutTs@CovariantTypeVarTuple" is invariant, but "*tuple[object]" is not the same as "*tuple[int]" (reportAssignmentType)
23
+
generics_typevartuple_variance.py:24:42 - error: Type "CovariantTypeVarTuple[int]" is not assignable to declared type "CovariantTypeVarTuple[object]"
24
+
"CovariantTypeVarTuple[int]" is not assignable to "CovariantTypeVarTuple[object]"
25
+
Type parameter "OutTs@CovariantTypeVarTuple" is invariant, but "*tuple[int]" is not the same as "*tuple[object]" (reportAssignmentType)
26
+
generics_typevartuple_variance.py:27:29 - error: "contravariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)
27
+
generics_typevartuple_variance.py:38:52 - error: Type "ContravariantTypeVarTupleOld[int]" is not assignable to declared type "ContravariantTypeVarTupleOld[object]"
28
+
"ContravariantTypeVarTupleOld[int]" is not assignable to "ContravariantTypeVarTupleOld[object]"
29
+
Type parameter "InTs@ContravariantTypeVarTupleOld" is invariant, but "*tuple[int]" is not the same as "*tuple[object]" (reportAssignmentType)
30
+
generics_typevartuple_variance.py:39:49 - error: Type "ContravariantTypeVarTupleOld[object]" is not assignable to declared type "ContravariantTypeVarTupleOld[int]"
31
+
"ContravariantTypeVarTupleOld[object]" is not assignable to "ContravariantTypeVarTupleOld[int]"
32
+
Type parameter "InTs@ContravariantTypeVarTupleOld" is invariant, but "*tuple[object]" is not the same as "*tuple[int]" (reportAssignmentType)
33
+
generics_typevartuple_variance.py:41:31 - error: "covariant" is unknown parameter to TypeVarTuple (reportGeneralTypeIssues)
34
+
generics_typevartuple_variance.py:52:46 - error: Type "CovariantTypeVarTupleOld[object]" is not assignable to declared type "CovariantTypeVarTupleOld[int]"
35
+
"CovariantTypeVarTupleOld[object]" is not assignable to "CovariantTypeVarTupleOld[int]"
36
+
Type parameter "OutTs@CovariantTypeVarTupleOld" is invariant, but "*tuple[object]" is not the same as "*tuple[int]" (reportAssignmentType)
37
+
generics_typevartuple_variance.py:53:49 - error: Type "CovariantTypeVarTupleOld[int]" is not assignable to declared type "CovariantTypeVarTupleOld[object]"
38
+
"CovariantTypeVarTupleOld[int]" is not assignable to "CovariantTypeVarTupleOld[object]"
39
+
Type parameter "OutTs@CovariantTypeVarTupleOld" is invariant, but "*tuple[int]" is not the same as "*tuple[object]" (reportAssignmentType)
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject use of type variable within an upper bound.</p></span></div></th>
0 commit comments