Skip to content
Open
Show file tree
Hide file tree
Changes from all 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]
"""
11 changes: 5 additions & 6 deletions conformance/results/mypy/generics_typevartuple_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ generics_typevartuple_basic.py:52: error: Free type variable expected in Generic
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: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:65: error: Too many positional arguments for "TypeVarTuple" [misc]
generics_typevartuple_basic.py:66: error: Unexpected keyword argument "bound" for "TypeVarTuple" [misc]
generics_typevartuple_basic.py:99: error: Cannot infer value of type parameter "Shape" of "multiply" [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:106: error: Can only use one type var tuple in a class def [misc]
"""
conformance_automated = "Fail"
errors_diff = """
Line 91: Expected 1 errors
Line 90: Expected 1 errors
"""
26 changes: 26 additions & 0 deletions conformance/results/mypy/generics_typevartuple_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 13: Expected 1 errors
Line 15: Expected 1 errors
Line 35: Expected 1 errors
Line 46: Expected 1 errors
Line 50: Expected 1 errors
Line 57: Expected 1 errors
Line 23: Unexpected errors ['generics_typevartuple_variance.py:23: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]']
Line 33: Unexpected errors ['generics_typevartuple_variance.py:33: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int, object]", variable has type "CovariantTypeVarTuple[float, float]") [assignment]']
Line 39: Unexpected errors ['generics_typevartuple_variance.py:39: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]']
Line 51: Unexpected errors ['generics_typevartuple_variance.py:51: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]']
Line 53: Unexpected errors ['generics_typevartuple_variance.py:53: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]']
"""
output = """
generics_typevartuple_variance.py:14: error: Incompatible types in assignment (expression has type "InvariantTypeVarTuple[object]", variable has type "InvariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:22: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[int]", variable has type "ContravariantTypeVarTuple[object, object]") [assignment]
generics_typevartuple_variance.py:23: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:31: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[object]", variable has type "CovariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:33: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int, object]", variable has type "CovariantTypeVarTuple[float, float]") [assignment]
generics_typevartuple_variance.py:39: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]
generics_typevartuple_variance.py:51: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]
generics_typevartuple_variance.py:53: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]
generics_typevartuple_variance.py:64: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[object]", variable has type "CovariantTypeVarTupleOld[int]") [assignment]
"""
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]
"""
13 changes: 6 additions & 7 deletions conformance/results/pyrefly/generics_typevartuple_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ ERROR generics_typevartuple_basic.py:52:22-27: `TypeVarTuple` must be unpacked [
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: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:65:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:66:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple]
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]
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]
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]
ERROR generics_typevartuple_basic.py:106:7-13: Type parameters for class may not have more than one TypeVarTuple [invalid-type-var-tuple]
"""
30 changes: 30 additions & 0 deletions conformance/results/pyrefly/generics_typevartuple_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 15: Expected 1 errors
Line 35: Expected 1 errors
Line 46: Expected 1 errors
Line 57: Expected 1 errors
Line 23: Unexpected errors ['`ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]']
Line 32: Unexpected errors ['`CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]']
Line 33: Unexpected errors ['4: `CovariantTypeVarTuple[int, object]` is not assignable to `CovariantTypeVarTuple[float, float]` [bad-assignment]']
Line 39: Unexpected errors ['Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 51: Unexpected errors ['`ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]']
Line 53: Unexpected errors ['Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 65: Unexpected errors ['`CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]']
"""
output = """
ERROR generics_typevartuple_variance.py:13:45-73: `InvariantTypeVarTuple[int]` is not assignable to `InvariantTypeVarTuple[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:14:42-73: `InvariantTypeVarTuple[object]` is not assignable to `InvariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:22:53-85: `ContravariantTypeVarTuple[int]` is not assignable to `ContravariantTypeVarTuple[object, object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:23:42-77: `ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:31:39-70: `CovariantTypeVarTuple[object]` is not assignable to `CovariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:32:42-70: `CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:33:53-36:4: `CovariantTypeVarTuple[int, object]` is not assignable to `CovariantTypeVarTuple[float, float]` [bad-assignment]
ERROR generics_typevartuple_variance.py:39:29-47: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:50:52-87: `ContravariantTypeVarTupleOld[int]` is not assignable to `ContravariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:51:49-87: `ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:53:31-45: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:64:46-80: `CovariantTypeVarTupleOld[object]` is not assignable to `CovariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:65:49-80: `CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]
"""
46 changes: 46 additions & 0 deletions conformance/results/pyright/generics_paramspec_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 40: Expected 1 errors
Line 51: Expected 1 errors
Line 22: Unexpected errors ['generics_paramspec_variance.py:22:39 - error: Type "ContravariantParamSpec[(object)]" is not assignable to declared type "ContravariantParamSpec[(int)]"']
Line 31: Unexpected errors ['generics_paramspec_variance.py:31:39 - error: Type "CovariantParamSpec[(int)]" is not assignable to declared type "CovariantParamSpec[(object)]"']
Line 33: Unexpected errors ['generics_paramspec_variance.py:33:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)']
Line 45: Unexpected errors ['generics_paramspec_variance.py:45:46 - error: Type "ContravariantParamSpecOld[(object)]" is not assignable to declared type "ContravariantParamSpecOld[(int)]"']
Line 47: Unexpected errors ['generics_paramspec_variance.py:47:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)']
Line 58: Unexpected errors ['generics_paramspec_variance.py:58:46 - error: Type "CovariantParamSpecOld[(int)]" is not assignable to declared type "CovariantParamSpecOld[(object)]"']
"""
output = """
generics_paramspec_variance.py:14:42 - error: Type "InvariantParamSpec[(int)]" is not assignable to declared type "InvariantParamSpec[(object)]"
  "InvariantParamSpec[(int)]" is not assignable to "InvariantParamSpec[(object)]"
    Type parameter "InOutP@InvariantParamSpec" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType)
generics_paramspec_variance.py:15:39 - error: Type "InvariantParamSpec[(object)]" is not assignable to declared type "InvariantParamSpec[(int)]"
  "InvariantParamSpec[(object)]" is not assignable to "InvariantParamSpec[(int)]"
    Type parameter "InOutP@InvariantParamSpec" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType)
generics_paramspec_variance.py:21:42 - error: Type "ContravariantParamSpec[(int)]" is not assignable to declared type "ContravariantParamSpec[(object)]"
  "ContravariantParamSpec[(int)]" is not assignable to "ContravariantParamSpec[(object)]"
    Type parameter "InP@ContravariantParamSpec" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType)
generics_paramspec_variance.py:22:39 - error: Type "ContravariantParamSpec[(object)]" is not assignable to declared type "ContravariantParamSpec[(int)]"
  "ContravariantParamSpec[(object)]" is not assignable to "ContravariantParamSpec[(int)]"
    Type parameter "InP@ContravariantParamSpec" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType)
generics_paramspec_variance.py:30:36 - error: Type "CovariantParamSpec[(object)]" is not assignable to declared type "CovariantParamSpec[(int)]"
  "CovariantParamSpec[(object)]" is not assignable to "CovariantParamSpec[(int)]"
    Type parameter "OutP@CovariantParamSpec" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType)
generics_paramspec_variance.py:31:39 - error: Type "CovariantParamSpec[(int)]" is not assignable to declared type "CovariantParamSpec[(object)]"
  "CovariantParamSpec[(int)]" is not assignable to "CovariantParamSpec[(object)]"
    Type parameter "OutP@CovariantParamSpec" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType)
generics_paramspec_variance.py:33:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)
generics_paramspec_variance.py:44:49 - error: Type "ContravariantParamSpecOld[(int)]" is not assignable to declared type "ContravariantParamSpecOld[(object)]"
  "ContravariantParamSpecOld[(int)]" is not assignable to "ContravariantParamSpecOld[(object)]"
    Type parameter "InP@ContravariantParamSpecOld" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType)
generics_paramspec_variance.py:45:46 - error: Type "ContravariantParamSpecOld[(object)]" is not assignable to declared type "ContravariantParamSpecOld[(int)]"
  "ContravariantParamSpecOld[(object)]" is not assignable to "ContravariantParamSpecOld[(int)]"
    Type parameter "InP@ContravariantParamSpecOld" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType)
generics_paramspec_variance.py:47:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)
generics_paramspec_variance.py:57:43 - error: Type "CovariantParamSpecOld[(object)]" is not assignable to declared type "CovariantParamSpecOld[(int)]"
  "CovariantParamSpecOld[(object)]" is not assignable to "CovariantParamSpecOld[(int)]"
    Type parameter "OutP@CovariantParamSpecOld" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType)
generics_paramspec_variance.py:58:46 - error: Type "CovariantParamSpecOld[(int)]" is not assignable to declared type "CovariantParamSpecOld[(object)]"
  "CovariantParamSpecOld[(int)]" is not assignable to "CovariantParamSpecOld[(object)]"
    Type parameter "OutP@CovariantParamSpecOld" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType)
"""
Loading