Skip to content

Commit 39ac61a

Browse files
committed
Fix copytype
1 parent 6ac6aaf commit 39ac61a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mypy/copytype.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def visit_type_var(self, t: TypeVarType) -> ProperType:
8181
return self.copy_common(t, dup)
8282

8383
def visit_param_spec(self, t: ParamSpecType) -> ProperType:
84-
dup = ParamSpecType(t.name, t.fullname, t.id, t.flavor, t.upper_bound, prefix=t.prefix)
84+
dup = ParamSpecType(
85+
t.name, t.fullname, t.id, t.flavor, t.upper_bound, t.default, prefix=t.prefix
86+
)
8587
return self.copy_common(t, dup)
8688

8789
def visit_parameters(self, t: Parameters) -> ProperType:
@@ -95,7 +97,9 @@ def visit_parameters(self, t: Parameters) -> ProperType:
9597
return self.copy_common(t, dup)
9698

9799
def visit_type_var_tuple(self, t: TypeVarTupleType) -> ProperType:
98-
dup = TypeVarTupleType(t.name, t.fullname, t.id, t.upper_bound, t.tuple_fallback)
100+
dup = TypeVarTupleType(
101+
t.name, t.fullname, t.id, t.upper_bound, t.tuple_fallback, t.default
102+
)
99103
return self.copy_common(t, dup)
100104

101105
def visit_unpack_type(self, t: UnpackType) -> ProperType:

0 commit comments

Comments
 (0)