Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst committed Jan 27, 2023
1 parent 2316b06 commit 5148e5f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mypy/plugins/attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,9 @@ def evolve_function_sig_callback(ctx: mypy.plugin.FunctionSigContext) -> Callabl
)
return ctx.default_signature

arg_names = attrs_init_type.arg_names.copy()
arg_names[0] = "inst"
return attrs_init_type.copy_modified(
arg_names=arg_names,
arg_kinds=[ARG_POS] + [ARG_NAMED_OPT] * (len(attrs_init_type.arg_kinds) - 1),
arg_names=["inst"] + attrs_init_type.arg_names[1:],
arg_kinds=[ARG_POS] + [ARG_NAMED_OPT for _ in attrs_init_type.arg_kinds[1:]],
ret_type=inst_type,
name=ctx.default_signature.name,
)

0 comments on commit 5148e5f

Please sign in to comment.