Skip to content

Commit 20f2c17

Browse files
committed
Fix __match_args__ for TypeVarLikeExpr
1 parent 13b8f84 commit 20f2c17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypy/nodes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2493,7 +2493,7 @@ class TypeVarExpr(TypeVarLikeExpr):
24932493

24942494
__slots__ = ("values",)
24952495

2496-
__match_args__ = ("name", "values", "upper_bound")
2496+
__match_args__ = ("name", "values", "upper_bound", "default")
24972497

24982498
# Value restriction: only types in the list are valid as values. If the
24992499
# list is empty, there is no restriction.
@@ -2541,7 +2541,7 @@ def deserialize(cls, data: JsonDict) -> TypeVarExpr:
25412541
class ParamSpecExpr(TypeVarLikeExpr):
25422542
__slots__ = ()
25432543

2544-
__match_args__ = ("name", "upper_bound")
2544+
__match_args__ = ("name", "upper_bound", "default")
25452545

25462546
def accept(self, visitor: ExpressionVisitor[T]) -> T:
25472547
return visitor.visit_paramspec_expr(self)
@@ -2575,7 +2575,7 @@ class TypeVarTupleExpr(TypeVarLikeExpr):
25752575

25762576
tuple_fallback: mypy.types.Instance
25772577

2578-
__match_args__ = ("name", "upper_bound")
2578+
__match_args__ = ("name", "upper_bound", "default")
25792579

25802580
def __init__(
25812581
self,

0 commit comments

Comments
 (0)