Skip to content

Commit

Permalink
STY: Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DWesl authored and rgommers committed Apr 21, 2024
1 parent 00cea9a commit d9f8b97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/check_python_h_first.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Check that Python.h is included before any stdlib headers.
May be a bit overzealous, but it should get the job done.
Expand Down Expand Up @@ -50,7 +49,7 @@ def check_python_h_included_first(name_to_check: str) -> int:
warned_python_construct = False
basename_to_check = os.path.basename(name_to_check)
in_comment = False
with open(name_to_check, "r") as in_file:
with open(name_to_check) as in_file:
for i, line in enumerate(in_file, 1):
# Very basic comment parsing
# Assumes /*...*/ comments are on their own lines
Expand Down

0 comments on commit d9f8b97

Please sign in to comment.