Skip to content

Commit

Permalink
Use generators instead of list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
boehmseb committed Oct 9, 2023
1 parent 7280c24 commit bad9f85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchbuild/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def __repr__(self) -> str:
if self._label:
repr_str = f"{self._label} {repr_str}"
if self._args:
repr_str += f" args={tuple([str(arg) for arg in self._args])}"
repr_str += f" args={tuple(str(arg) for arg in self._args)}"
if self._env:
repr_str += f" env={self._env}"
if self._output:
Expand All @@ -638,7 +638,7 @@ def __repr__(self) -> str:

def __str__(self) -> str:
env_str = " ".join([f"{k}={str(v)}" for k, v in self._env.items()])
args_str = " ".join(tuple([str(arg) for arg in self._args]))
args_str = " ".join(tuple(str(arg) for arg in self._args))

command_str = f"{self._path}"
if env_str:
Expand Down

0 comments on commit bad9f85

Please sign in to comment.