Skip to content

Commit

Permalink
PERF: Use regex method instead of module function
Browse files Browse the repository at this point in the history
Not sure what `re.compile` is doing before the matching that takes as long as the regex
  • Loading branch information
DWesl authored and rgommers committed Apr 21, 2024
1 parent 26d35a4 commit f832659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/check_python_h_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def check_python_h_included_first(name_to_check: str) -> int:
if "*/" in line:
in_comment = False
continue
match = re.match(HEADER_PATTERN, line)
match = HEADER_PATTERN.match(line)
if match:
this_header = match.group(1)
if this_header in PYTHON_INCLUDING_HEADERS:
Expand Down

0 comments on commit f832659

Please sign in to comment.