File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments