Skip to content

Commit

Permalink
Remove unnecessary parentheses. (#783)
Browse files Browse the repository at this point in the history
This will fix warnings when using newer versions of flake8.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
  • Loading branch information
clalancette authored Jan 26, 2024
1 parent 5ea1c94 commit 9f3c182
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def generate_type_hash(generator_arguments_file: str) -> List[str]:
except Exception as e:
print('Error processing idl file: ' +
str(locator.get_absolute_path()), file=sys.stderr)
raise(e)
raise e

idl_rel_path = Path(idl_parts[1])
generate_to_dir = (output_dir / idl_rel_path).parent
Expand Down
8 changes: 4 additions & 4 deletions rosidl_parser/test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ def test_service_parser(service_idl_file):
assert srv.namespaced_type.name == 'MyService'
assert len(srv.request_message.structure.members) == 2
assert len(srv.response_message.structure.members) == 1
assert(srv.event_message.structure.namespaced_type.name ==
assert (srv.event_message.structure.namespaced_type.name ==
'MyService' + SERVICE_EVENT_MESSAGE_SUFFIX)

event_message_members = [i.name for i in srv.event_message.structure.members]
assert('request' in event_message_members)
assert('response' in event_message_members)
assert('info' in event_message_members)
assert 'request' in event_message_members
assert 'response' in event_message_members
assert 'info' in event_message_members

constants = srv.request_message.constants
assert len(constants) == 1
Expand Down
2 changes: 1 addition & 1 deletion rosidl_pycommon/rosidl_pycommon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def generate_files(
print(
'Error processing idl file: ' +
str(locator.get_absolute_path()), file=sys.stderr)
raise(e)
raise e

return generated_files

Expand Down

0 comments on commit 9f3c182

Please sign in to comment.