Skip to content

Commit ca1fb8f

Browse files
committed
Refactor function call and improve code formatting
1 parent f4191c1 commit ca1fb8f

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

pylint/checkers/classes.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,30 +1820,28 @@ def _check_signature(self, method1, refmethod, class_type, cls):
18201820
if refmethod.args.kwonlyargs:
18211821
total_args_refmethod += len(refmethod.args.kwonlyargs)
18221822
error_type = "arguments-differ"
1823-
msg_args=(
1823+
msg_args = (
18241824
msg
18251825
+ f"was {total_args_refmethod} in '{refmethod.parent.name}.{refmethod.name}' and "
18261826
f"is now {total_args_method1} in",
18271827
class_type,
1828-
f"{method1.parent.name}.{method1.name}"
1828+
f"{method1.parent.name}.{method1.name}",
18291829
)
18301830
elif "renamed" in msg:
18311831
error_type = "arguments-renamed"
1832-
msg_args=(
1832+
msg_args = (
18331833
msg,
18341834
class_type,
1835-
f"{method1.parent.name}.{method1.name}"
1835+
f"{method1.parent.name}.{method1.name}",
18361836
)
18371837
else:
18381838
error_type = "arguments-differ"
1839-
msg_args=(
1839+
msg_args = (
18401840
msg,
18411841
class_type,
1842-
f"{method1.parent.name}.{method1.name}"
1842+
f"{method1.parent.name}.{method1.name}",
18431843
)
1844-
self.add_message(
1845-
error_type, args=msg_args, node=method1
1846-
)
1844+
self.add_message(error_type, args=msg_args, node=method1)
18471845
elif (
18481846
len(method1.args.defaults) < len(refmethod.args.defaults)
18491847
and not method1.args.vararg

0 commit comments

Comments
 (0)