Skip to content

Commit

Permalink
pw_presubmit: Remove unnecessary print
Browse files Browse the repository at this point in the history
Remove unnecessary print from the inclusive language check. Previously,
when all checks were passing, there was an extra line in the inclusive
language check output.

Change-Id: Ia6b2f5bf043c568f8ad5c5d5f876a64560b88c33
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/125592
Pigweed-Auto-Submit: Rob Mohr <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Reviewed-by: Erik Gilling <[email protected]>
  • Loading branch information
mohrr authored and CQ Bot Account committed Dec 28, 2022
1 parent d5882c8 commit b9ac411
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pw_presubmit/py/pw_presubmit/inclusive_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,17 @@ def presubmit_check(
# File is not text, like a gif.
pass

with open(ctx.failure_summary_log, 'w') as outs:
for i, (path, matches) in enumerate(found_words.items()):
if i:
print('=' * 40, file=outs)
print(path, file=outs)
for match in matches:
print(match, file=outs)
if found_words:
with open(ctx.failure_summary_log, 'w') as outs:
for i, (path, matches) in enumerate(found_words.items()):
if i:
print('=' * 40, file=outs)
print(path, file=outs)
for match in matches:
print(match, file=outs)

print(ctx.failure_summary_log.read_text(), end=None)
print(ctx.failure_summary_log.read_text(), end=None)

if found_words:
print()
print(
"""
Expand Down

0 comments on commit b9ac411

Please sign in to comment.