From 443946b2053801a0aa89b92d42928f41a122c31a Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sun, 2 Jul 2023 22:44:47 -0400 Subject: [PATCH] Remove Python 2 check in visit_call() Arguments cannot be parenthesized in python3. --- pylint/checkers/typecheck.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index 11b367fec4..835aff52ac 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -1539,16 +1539,8 @@ def visit_call(self, node: nodes.Call) -> None: parameters: list[tuple[tuple[str | None, nodes.NodeNG | None], bool]] = [] parameter_name_to_index = {} for i, arg in enumerate(args): - if isinstance(arg, nodes.Tuple): - name = None - # Don't store any parameter names within the tuple, since those - # are not assignable from keyword arguments. - else: - assert isinstance(arg, nodes.AssignName) - # This occurs with: - # def f( (a), (b) ): pass - name = arg.name - parameter_name_to_index[name] = i + name = arg.name + parameter_name_to_index[name] = i if i >= num_mandatory_parameters: defval = called.args.defaults[i - num_mandatory_parameters] else: