Skip to content

Commit

Permalink
FIX: Include file name in error message.
Browse files Browse the repository at this point in the history
Real helpful for actually fixing the thing.
  • Loading branch information
DWesl authored Apr 19, 2024
1 parent 1015ded commit 1756855
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/check_python_h_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ def check_python_h_included_first(name_to_check: str) -> int:
included_non_python_headers.append(i)

if this_header in included_headers:
print(f"Header {this_header:s} included twice, second on line {i:d}", file=sys.stderr)
print(
f"Header {this_header:s} included twice in file {name_to_check:s}, second on line {i:d}",
file=sys.stderr
)
duplicate_header_count += 1
included_headers.append(this_header)
elif (not included_python and not warned_python_construct and ".h" not in basename_to_check) and (
Expand Down

0 comments on commit 1756855

Please sign in to comment.