Skip to content

Commit a3d6ac1

Browse files
authored
PERF: Use regex method instead of module function
Not sure what `re.compile` is doing before the matching that takes as long as the regex
1 parent 66ecb66 commit a3d6ac1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/check_python_h_first.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def check_python_h_included_first(name_to_check: str) -> int:
6262
if "*/" in line:
6363
in_comment = False
6464
continue
65-
match = re.match(HEADER_PATTERN, line)
65+
match = HEADER_PATTERN.match(line)
6666
if match:
6767
this_header = match.group(1)
6868
if this_header in PYTHON_INCLUDING_HEADERS:

0 commit comments

Comments
 (0)