Skip to content

Commit

Permalink
Fix a flake8 warning in ament_uncrustify. (ament#471)
Browse files Browse the repository at this point in the history
No need for parentheses after a 'with' statement.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: WU MENGHUNG <[email protected]>
  • Loading branch information
clalancette authored and wuisky committed Feb 7, 2024
1 parent 0275c61 commit 54426ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ament_uncrustify/ament_uncrustify/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def main(argv=sys.argv[1:]):
report.append((filename, diff_lines))
if args.reformat:
# overwrite original with reformatted file
with(open(filename, 'wb')) as original_file:
with open(filename, 'wb') as original_file:
with open(modified_filename, 'rb') as modified_file:
original_file.write(modified_file.read())
finally:
Expand Down

0 comments on commit 54426ec

Please sign in to comment.