Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions conformance/results/mypy/generics_paramspec_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 15: Expected 1 errors
Line 30: Expected 1 errors
Line 40: Expected 1 errors
Line 51: Expected 1 errors
Line 57: Expected 1 errors
Line 31: Unexpected errors ['generics_paramspec_variance.py:31: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment]']
Line 33: Unexpected errors ['generics_paramspec_variance.py:33: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]']
Line 47: Unexpected errors ['generics_paramspec_variance.py:47: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]']
Line 58: Unexpected errors ['generics_paramspec_variance.py:58: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment]']
"""
output = """
generics_paramspec_variance.py:14: error: Incompatible types in assignment (expression has type "InvariantParamSpec[[int]]", variable has type "InvariantParamSpec[[object]]") [assignment]
generics_paramspec_variance.py:21: error: Incompatible types in assignment (expression has type "ContravariantParamSpec[[int]]", variable has type "ContravariantParamSpec[[object]]") [assignment]
generics_paramspec_variance.py:31: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment]
generics_paramspec_variance.py:33: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]
generics_paramspec_variance.py:44: error: Incompatible types in assignment (expression has type "ContravariantParamSpecOld[[int]]", variable has type "ContravariantParamSpecOld[[object]]") [assignment]
generics_paramspec_variance.py:47: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]
generics_paramspec_variance.py:58: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment]
"""
16 changes: 8 additions & 8 deletions conformance/results/mypy/generics_typevartuple_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ notes = """
Does not enforce that tuples captured by `TypeVarTuple` are same length.
"""
output = """
generics_typevartuple_basic.py:42: error: Argument 1 to "Array" has incompatible type "Height"; expected "tuple[Height, Width]" [arg-type]
generics_typevartuple_basic.py:43: error: Argument 1 to "Array" has incompatible type "tuple[Batch, Width]"; expected "tuple[Batch, Height, Width]" [arg-type]
generics_typevartuple_basic.py:45: error: Argument 1 to "Array" has incompatible type "tuple[Time, Batch, Width, Height]"; expected "tuple[Time, Batch, Height, Width]" [arg-type]
generics_typevartuple_basic.py:52: error: Free type variable expected in Generic[...] [misc]
generics_typevartuple_basic.py:53: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]
generics_typevartuple_basic.py:56: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]
generics_typevartuple_basic.py:59: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]
generics_typevartuple_basic.py:65: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]
generics_typevartuple_basic.py:43: error: Argument 1 to "Array" has incompatible type "Height"; expected "tuple[Height, Width]" [arg-type]
generics_typevartuple_basic.py:44: error: Argument 1 to "Array" has incompatible type "tuple[Batch, Width]"; expected "tuple[Batch, Height, Width]" [arg-type]
generics_typevartuple_basic.py:46: error: Argument 1 to "Array" has incompatible type "tuple[Time, Batch, Width, Height]"; expected "tuple[Time, Batch, Height, Width]" [arg-type]
generics_typevartuple_basic.py:53: error: Free type variable expected in Generic[...] [misc]
generics_typevartuple_basic.py:54: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]
generics_typevartuple_basic.py:57: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]
generics_typevartuple_basic.py:60: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]
generics_typevartuple_basic.py:66: error: Too many positional arguments for "TypeVarTuple" [misc]
generics_typevartuple_basic.py:67: error: Unexpected keyword argument "bound" for "TypeVarTuple" [misc]
generics_typevartuple_basic.py:100: error: Cannot infer value of type parameter "Shape" of "multiply" [misc]
generics_typevartuple_basic.py:101: error: Cannot infer value of type parameter "Shape" of "multiply" [misc]
generics_typevartuple_basic.py:107: error: Can only use one type var tuple in a class def [misc]
generics_typevartuple_basic.py:111: error: Can only use one type var tuple in a class def [misc]
"""
conformance_automated = "Fail"
errors_diff = """
Expand Down
28 changes: 28 additions & 0 deletions conformance/results/mypy/generics_typevartuple_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 14: Expected 1 errors
Line 16: Expected 1 errors
Line 36: Expected 1 errors
Line 50: Expected 1 errors
Line 60: Expected 1 errors
Line 64: Expected 1 errors
Line 71: Expected 1 errors
Line 24: Unexpected errors ['generics_typevartuple_variance.py:24: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]']
Line 34: Unexpected errors ['generics_typevartuple_variance.py:34: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int, object]", variable has type "CovariantTypeVarTuple[float, float]") [assignment]']
Line 54: Unexpected errors ['generics_typevartuple_variance.py:54: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]']
Line 65: Unexpected errors ['generics_typevartuple_variance.py:65: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]']
Line 68: Unexpected errors ['generics_typevartuple_variance.py:68: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]']
"""
output = """
generics_typevartuple_variance.py:15: error: Incompatible types in assignment (expression has type "InvariantTypeVarTuple[object]", variable has type "InvariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:23: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[int]", variable has type "ContravariantTypeVarTuple[object, object]") [assignment]
generics_typevartuple_variance.py:24: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:32: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[object]", variable has type "CovariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:34: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int, object]", variable has type "CovariantTypeVarTuple[float, float]") [assignment]
generics_typevartuple_variance.py:51: error: Incompatible types in assignment (expression has type "InvariantTypeVarTupleOld[object]", variable has type "InvariantTypeVarTupleOld[int]") [assignment]
generics_typevartuple_variance.py:54: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]
generics_typevartuple_variance.py:65: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]
generics_typevartuple_variance.py:68: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]
generics_typevartuple_variance.py:78: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[object]", variable has type "CovariantTypeVarTupleOld[int]") [assignment]
"""
18 changes: 9 additions & 9 deletions conformance/results/pycroscope/generics_typevartuple_basic.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
conformance_automated = "Pass"
conformance_automated = "Fail"
errors_diff = """
Line 111: Expected 1 errors
"""
output = """
./generics_typevartuple_basic.py:42:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument]
./generics_typevartuple_basic.py:43:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array~[NewType('Batch', int), NewType('Width', int)] [incompatible_assignment]
./generics_typevartuple_basic.py:44:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Time', int), NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array~[NewType('Time', int), NewType('Batch', int), NewType('Width', int), NewType('Height', int)] [incompatible_assignment]
./generics_typevartuple_basic.py:52:21: TypeVarTuple must be unpacked [invalid_base]
./generics_typevartuple_basic.py:53:30: TypeVarTuple must be unpacked [invalid_annotation]
./generics_typevartuple_basic.py:56:27: TypeVarTuple must be unpacked [invalid_annotation]
./generics_typevartuple_basic.py:59:17: TypeVarTuple must be unpacked [invalid_annotation]
./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call]
./generics_typevartuple_basic.py:43:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument]
./generics_typevartuple_basic.py:44:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array~[NewType('Batch', int), NewType('Width', int)] [incompatible_assignment]
./generics_typevartuple_basic.py:45:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Time', int), NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array~[NewType('Time', int), NewType('Batch', int), NewType('Width', int), NewType('Height', int)] [incompatible_assignment]
./generics_typevartuple_basic.py:53:21: TypeVarTuple must be unpacked [invalid_base]
./generics_typevartuple_basic.py:54:30: TypeVarTuple must be unpacked [invalid_annotation]
./generics_typevartuple_basic.py:57:27: TypeVarTuple must be unpacked [invalid_annotation]
./generics_typevartuple_basic.py:60:17: TypeVarTuple must be unpacked [invalid_annotation]
./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call]
./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call]
./generics_typevartuple_basic.py:91:0: Cannot resolve type variables [incompatible_call]
Expand Down
26 changes: 26 additions & 0 deletions conformance/results/pyrefly/generics_paramspec_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 14: Expected 1 errors
Line 21: Expected 1 errors
Line 30: Expected 1 errors
Line 40: Expected 1 errors
Line 51: Expected 1 errors
Line 22: Unexpected errors ['`ContravariantParamSpec[[object]]` is not assignable to `ContravariantParamSpec[[int]]` [bad-assignment]']
Line 31: Unexpected errors ['`CovariantParamSpec[[int]]` is not assignable to `CovariantParamSpec[[object]]` [bad-assignment]']
Line 33: Unexpected errors ['Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]']
Line 45: Unexpected errors ['`ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]']
Line 47: Unexpected errors ['Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]']
Line 58: Unexpected errors ['`CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]']
"""
output = """
ERROR generics_paramspec_variance.py:15:39-67: `InvariantParamSpec[[object]]` is not assignable to `InvariantParamSpec[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:22:39-71: `ContravariantParamSpec[[object]]` is not assignable to `ContravariantParamSpec[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:31:39-64: `CovariantParamSpec[[int]]` is not assignable to `CovariantParamSpec[[object]]` [bad-assignment]
ERROR generics_paramspec_variance.py:33:24-42: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:44:49-81: `ContravariantParamSpecOld[[int]]` is not assignable to `ContravariantParamSpecOld[[object]]` [bad-assignment]
ERROR generics_paramspec_variance.py:45:46-81: `ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:47:26-40: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:57:43-74: `CovariantParamSpecOld[[object]]` is not assignable to `CovariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:58:46-74: `CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]
"""
16 changes: 8 additions & 8 deletions conformance/results/pyrefly/generics_typevartuple_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
ERROR generics_typevartuple_basic.py:42:34-43: Argument `Height` is not assignable to parameter `shape` with type `tuple[*@_]` in function `Array.__init__` [bad-argument-type]
ERROR generics_typevartuple_basic.py:43:35-62: `Array[Batch, Width]` is not assignable to `Array[Batch, Height, Width]` [bad-assignment]
ERROR generics_typevartuple_basic.py:44:41-46:2: `Array[Time, Batch, Width, Height]` is not assignable to `Array[Time, Batch, Height, Width]` [bad-assignment]
ERROR generics_typevartuple_basic.py:52:22-27: `TypeVarTuple` must be unpacked [invalid-annotation]
ERROR generics_typevartuple_basic.py:53:37-42: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:56:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:59:24-29: `TypeVarTuple` must be unpacked [invalid-annotation]
ERROR generics_typevartuple_basic.py:65:27-41: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:43:34-43: Argument `Height` is not assignable to parameter `shape` with type `tuple[*@_]` in function `Array.__init__` [bad-argument-type]
ERROR generics_typevartuple_basic.py:44:35-62: `Array[Batch, Width]` is not assignable to `Array[Batch, Height, Width]` [bad-assignment]
ERROR generics_typevartuple_basic.py:45:41-47:2: `Array[Time, Batch, Width, Height]` is not assignable to `Array[Time, Batch, Height, Width]` [bad-assignment]
ERROR generics_typevartuple_basic.py:53:22-27: `TypeVarTuple` must be unpacked [invalid-annotation]
ERROR generics_typevartuple_basic.py:54:37-42: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:57:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:60:24-29: `TypeVarTuple` must be unpacked [invalid-annotation]
ERROR generics_typevartuple_basic.py:66:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:67:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple]
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]
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]
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]
ERROR generics_typevartuple_basic.py:107:7-13: Type parameters for class may not have more than one TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:111:7-13: Type parameters for class may not have more than one TypeVarTuple [invalid-type-var-tuple]
"""
32 changes: 32 additions & 0 deletions conformance/results/pyrefly/generics_typevartuple_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 16: Expected 1 errors
Line 36: Expected 1 errors
Line 60: Expected 1 errors
Line 71: Expected 1 errors
Line 24: Unexpected errors ['`ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]']
Line 33: Unexpected errors ['`CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]']
Line 34: Unexpected errors ['4: `CovariantTypeVarTuple[int, object]` is not assignable to `CovariantTypeVarTuple[float, float]` [bad-assignment]']
Line 54: Unexpected errors ['Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 65: Unexpected errors ['`ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]']
Line 68: Unexpected errors ['Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 79: Unexpected errors ['`CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]']
"""
output = """
ERROR generics_typevartuple_variance.py:14:45-73: `InvariantTypeVarTuple[int]` is not assignable to `InvariantTypeVarTuple[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:15:42-73: `InvariantTypeVarTuple[object]` is not assignable to `InvariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:23:53-85: `ContravariantTypeVarTuple[int]` is not assignable to `ContravariantTypeVarTuple[object, object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:24:42-77: `ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:32:39-70: `CovariantTypeVarTuple[object]` is not assignable to `CovariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:33:42-70: `CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:34:53-37:4: `CovariantTypeVarTuple[int, object]` is not assignable to `CovariantTypeVarTuple[float, float]` [bad-assignment]
ERROR generics_typevartuple_variance.py:50:45-76: `InvariantTypeVarTupleOld[int]` is not assignable to `InvariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:51:42-76: `InvariantTypeVarTupleOld[object]` is not assignable to `InvariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:54:29-47: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:64:52-87: `ContravariantTypeVarTupleOld[int]` is not assignable to `ContravariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:65:49-87: `ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:68:31-45: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:78:46-80: `CovariantTypeVarTupleOld[object]` is not assignable to `CovariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:79:49-80: `CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]
"""
Loading
Loading