Skip to content

Commit 7188141

Browse files
committed
style
1 parent 2316b06 commit 7188141

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: mypy/plugins/attrs.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -937,11 +937,9 @@ def evolve_function_sig_callback(ctx: mypy.plugin.FunctionSigContext) -> Callabl
937937
)
938938
return ctx.default_signature
939939

940-
arg_names = attrs_init_type.arg_names.copy()
941-
arg_names[0] = "inst"
942940
return attrs_init_type.copy_modified(
943-
arg_names=arg_names,
944-
arg_kinds=[ARG_POS] + [ARG_NAMED_OPT] * (len(attrs_init_type.arg_kinds) - 1),
941+
arg_names=["self"] + attrs_init_type.arg_names[1:],
942+
arg_kinds=[ARG_POS] + [ARG_NAMED_OPT for _ in attrs_init_type.arg_kinds[1:]],
945943
ret_type=inst_type,
946944
name=ctx.default_signature.name,
947945
)

0 commit comments

Comments
 (0)