Skip to content

Commit

Permalink
Convert list comprehension to generator (#314)
Browse files Browse the repository at this point in the history
Addresses flake8 C412 errors introduced by flake8-comprehension 2.2.0

Signed-off-by: Scott K Logan <logans@cottsay.net>
  • Loading branch information
cottsay committed Aug 12, 2019
1 parent 0ce8efa commit e24cf7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ros2node/ros2node/verb/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def add_arguments(self, parser, cli_name):
def main(self, *, args):
with NodeStrategy(args) as node:
node_names = get_node_names(node=node, include_hidden_nodes=True)
if args.node_name in [n.full_name for n in node_names]:
if args.node_name in (n.full_name for n in node_names):
with DirectNode(args) as node:
print(args.node_name)
subscribers = get_subscriber_info(node=node, remote_node_name=args.node_name)
Expand Down

0 comments on commit e24cf7b

Please sign in to comment.