File tree 1 file changed +4
-3
lines changed
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:
337
337
return True
338
338
339
339
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 , [])]
341
341
arg_kinds = [ARG_POS ]
342
- arg_names = [None ]
342
+ arg_names : list [ str | None ] = [None ]
343
343
for attr in attributes :
344
+ assert attr .type is not None
344
345
arg_types .append (attr .type )
345
346
arg_names .append (attr .name )
346
347
arg_kinds .append (
@@ -834,6 +835,6 @@ def replace_function_sig_callback(ctx: FunctionSigContext) -> CallableType:
834
835
)
835
836
return ctx .default_signature
836
837
837
- repl_type = repl .type
838
+ repl_type = get_proper_type ( repl .type )
838
839
assert isinstance (repl_type , CallableType )
839
840
return repl_type
You can’t perform that action at this time.
0 commit comments