Skip to content

Commit 32b1d47

Browse files
committed
fix typing
1 parent 89257b5 commit 32b1d47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mypy/plugins/dataclasses.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,11 @@ def transform(self) -> bool:
337337
return True
338338

339339
def _add_internal_replace_method(self, attributes: list[DataclassAttribute]) -> None:
340-
arg_types = [Instance(self._cls.info, [])]
340+
arg_types: list[Type] = [Instance(self._cls.info, [])]
341341
arg_kinds = [ARG_POS]
342-
arg_names = [None]
342+
arg_names: list[str | None] = [None]
343343
for attr in attributes:
344+
assert attr.type is not None
344345
arg_types.append(attr.type)
345346
arg_names.append(attr.name)
346347
arg_kinds.append(
@@ -834,6 +835,6 @@ def replace_function_sig_callback(ctx: FunctionSigContext) -> CallableType:
834835
)
835836
return ctx.default_signature
836837

837-
repl_type = repl.type
838+
repl_type = get_proper_type(repl.type)
838839
assert isinstance(repl_type, CallableType)
839840
return repl_type

0 commit comments

Comments
 (0)