Skip to content

Commit

Permalink
Merge pull request #1254 from correctmost/cm/avoid-appends
Browse files Browse the repository at this point in the history
Use list comprehensions to avoid append() calls
  • Loading branch information
asottile authored Aug 9, 2024
2 parents 3d5962b + bb41352 commit fc2c2ba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1910,9 +1910,7 @@ def readline(self):

def run_check(self, check, argument_names):
"""Run a check plugin."""
arguments = []
for name in argument_names:
arguments.append(getattr(self, name))
arguments = [getattr(self, name) for name in argument_names]
return check(*arguments)

def init_checker_state(self, name, argument_names):
Expand Down

0 comments on commit fc2c2ba

Please sign in to comment.