From 88e34495566db251ed94160f50541442c4b93720 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:29:08 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pylint/checkers/typecheck.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index a9c39d5c88..f6e5ac3d13 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -1488,14 +1488,17 @@ def _dp(s, val=None): # _dp("isinst", isinstance(node.frame(), nodes.ClassDef)) # _dp("funcdef", isinstance(called, nodes.FunctionDef)) _dp("called", called) - _dp("bound method init in called", "BoundMethod __init__ of builtins.object" in str(called)) + _dp( + "bound method init in called", + "BoundMethod __init__ of builtins.object" in str(called), + ) _dp("called.args", called.args) _dp("frame body", node.frame().body) # _dp("called in frame body", called in node.frame().body) # _dp("dec names", called.decoratornames()) def _call_site_has_args(cs): - "True if any args passed." + """True if any args passed.""" has_args = ( False or len(cs.positional_arguments) > 0 @@ -1514,7 +1517,9 @@ def _call_site_has_args(cs): # is handled elsewhere. if "BoundMethod __init__ of builtins.object" in str(called): if _call_site_has_args(call_site): - self.add_message("too-many-function-args", node=node, args=("__init__",)) + self.add_message( + "too-many-function-args", node=node, args=("__init__",) + ) return if len(called.argnames()) != len(set(called.argnames())):