Skip to content

Commit

Permalink
Switch to using a comprehension for process_names. (#614)
Browse files Browse the repository at this point in the history
Newer versions of flake8-comprehenstion complain about this
usage, and the new code should be backwards compatible and
faster to boot.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored May 20, 2022
1 parent 841e5b0 commit 074cd29
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions launch_testing/launch_testing/proc_info_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ def processes(self):

def process_names(self):
"""Get the name of all recorded processes."""
return map(
lambda x: x.process_details['name'],
self._proc_info.keys()
)
return [x.process_details['name'] for x in self._proc_info.keys()]

def __getitem__(self, key):
"""
Expand Down

0 comments on commit 074cd29

Please sign in to comment.