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
20 changes: 20 additions & 0 deletions conformance/results/mypy/generics_paramspec_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 22: Expected 1 errors
Line 32: Expected 1 errors
Line 43: Expected 1 errors
Line 49: Expected 1 errors
Line 23: Unexpected errors ['generics_paramspec_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment]']
Line 25: Unexpected errors ['generics_paramspec_variance.py:25: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]']
Line 39: Unexpected errors ['generics_paramspec_variance.py:39: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]']
Line 50: Unexpected errors ['generics_paramspec_variance.py:50: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment]']
"""
output = """
generics_paramspec_variance.py:13: error: Incompatible types in assignment (expression has type "ContravariantParamSpec[[int]]", variable has type "ContravariantParamSpec[[object]]") [assignment]
generics_paramspec_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment]
generics_paramspec_variance.py:25: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]
generics_paramspec_variance.py:36: error: Incompatible types in assignment (expression has type "ContravariantParamSpecOld[[int]]", variable has type "ContravariantParamSpecOld[[object]]") [assignment]
generics_paramspec_variance.py:39: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]
generics_paramspec_variance.py:50: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment]
"""
12 changes: 6 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,14 @@ 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: Free type variable expected in Generic[...] [misc]
generics_typevartuple_basic.py:106: error: Name "Ts1" is not defined [name-defined]
"""
conformance_automated = "Fail"
errors_diff = """
Line 91: Expected 1 errors
Line 90: Expected 1 errors
"""
20 changes: 20 additions & 0 deletions conformance/results/mypy/generics_typevartuple_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 14: Expected 1 errors
Line 34: Expected 1 errors
Line 38: Expected 1 errors
Line 45: Expected 1 errors
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]']
Line 27: Unexpected errors ['generics_typevartuple_variance.py:27: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]']
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]']
Line 41: Unexpected errors ['generics_typevartuple_variance.py:41: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]']
"""
output = """
generics_typevartuple_variance.py:15: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:23: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[object]", variable has type "CovariantTypeVarTuple[int]") [assignment]
generics_typevartuple_variance.py:27: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [misc]
generics_typevartuple_variance.py:39: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]
generics_typevartuple_variance.py:41: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]
generics_typevartuple_variance.py:52: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[object]", variable has type "CovariantTypeVarTupleOld[int]") [assignment]
"""
24 changes: 24 additions & 0 deletions conformance/results/pyrefly/generics_paramspec_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 13: Expected 1 errors
Line 22: Expected 1 errors
Line 32: Expected 1 errors
Line 43: Expected 1 errors
Line 14: Unexpected errors ['`ContravariantParamSpec[[object]]` is not assignable to `ContravariantParamSpec[[int]]` [bad-assignment]']
Line 23: Unexpected errors ['`CovariantParamSpec[[int]]` is not assignable to `CovariantParamSpec[[object]]` [bad-assignment]']
Line 25: Unexpected errors ['Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]']
Line 37: Unexpected errors ['`ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]']
Line 39: Unexpected errors ['Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]']
Line 50: Unexpected errors ['`CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]']
"""
output = """
ERROR generics_paramspec_variance.py:14:39-71: `ContravariantParamSpec[[object]]` is not assignable to `ContravariantParamSpec[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:23:39-64: `CovariantParamSpec[[int]]` is not assignable to `CovariantParamSpec[[object]]` [bad-assignment]
ERROR generics_paramspec_variance.py:25:24-42: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:36:49-81: `ContravariantParamSpecOld[[int]]` is not assignable to `ContravariantParamSpecOld[[object]]` [bad-assignment]
ERROR generics_paramspec_variance.py:37:46-81: `ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:39:26-40: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:49:43-74: `CovariantParamSpecOld[[object]]` is not assignable to `CovariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:50:46-74: `CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]
"""
14 changes: 7 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,11 @@ 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:22-26: Expected a type form, got instance of `*Unknown` [not-a-type]
ERROR generics_typevartuple_basic.py:106:23-26: Could not find name `Ts1` [unknown-name]
"""
24 changes: 24 additions & 0 deletions conformance/results/pyrefly/generics_typevartuple_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 34: Expected 1 errors
Line 45: Expected 1 errors
Line 15: Unexpected errors ['`ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]']
Line 24: Unexpected errors ['`CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]']
Line 27: Unexpected errors ['Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 39: Unexpected errors ['`ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]']
Line 41: Unexpected errors ['Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 53: Unexpected errors ['`CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]']
"""
output = """
ERROR generics_typevartuple_variance.py:14:45-77: `ContravariantTypeVarTuple[int]` is not assignable to `ContravariantTypeVarTuple[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:15:42-77: `ContravariantTypeVarTuple[object]` is not assignable to `ContravariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:23:39-70: `CovariantTypeVarTuple[object]` is not assignable to `CovariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:24:42-70: `CovariantTypeVarTuple[int]` is not assignable to `CovariantTypeVarTuple[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:27:29-47: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:38:52-87: `ContravariantTypeVarTupleOld[int]` is not assignable to `ContravariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:39:49-87: `ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:41:31-45: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:52:46-80: `CovariantTypeVarTupleOld[object]` is not assignable to `CovariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:53:49-80: `CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]
"""
40 changes: 40 additions & 0 deletions conformance/results/pyright/generics_paramspec_variance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
conformant = "Unsupported"
conformance_automated = "Fail"
errors_diff = """
Line 32: Expected 1 errors
Line 43: Expected 1 errors
Line 14: Unexpected errors ['generics_paramspec_variance.py:14:39 - error: Type "ContravariantParamSpec[(object)]" is not assignable to declared type "ContravariantParamSpec[(int)]"']
Line 23: Unexpected errors ['generics_paramspec_variance.py:23:39 - error: Type "CovariantParamSpec[(int)]" is not assignable to declared type "CovariantParamSpec[(object)]"']
Line 25: Unexpected errors ['generics_paramspec_variance.py:25:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)']
Line 37: Unexpected errors ['generics_paramspec_variance.py:37:46 - error: Type "ContravariantParamSpecOld[(object)]" is not assignable to declared type "ContravariantParamSpecOld[(int)]"']
Line 39: Unexpected errors ['generics_paramspec_variance.py:39:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)']
Line 50: Unexpected errors ['generics_paramspec_variance.py:50:46 - error: Type "CovariantParamSpecOld[(int)]" is not assignable to declared type "CovariantParamSpecOld[(object)]"']
"""
output = """
generics_paramspec_variance.py:13: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:14: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:22: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:23: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:25:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)
generics_paramspec_variance.py:36: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:37: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:39:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)
generics_paramspec_variance.py:49: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:50: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