Skip to content

Commit

Permalink
Remove Python 2 check in visit_call()
Browse files Browse the repository at this point in the history
Arguments cannot be parenthesized in python3.
  • Loading branch information
jacobtylerwalls committed Jul 3, 2023
1 parent 32effc5 commit 443946b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 443946b

Please sign in to comment.