Skip to content

Commit 7b8c405

Browse files
authored
Added file paths to ignore in linter scripts/validate_unwanted_patterns.py (#32927)
Co-authored-by: MomIsBestFriend <>
1 parent 0f044f8 commit 7b8c405

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/validate_unwanted_patterns.py

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from typing import IO, Callable, Iterable, List, Tuple
2020

2121
FILE_EXTENSIONS_TO_CHECK: Tuple[str, ...] = (".py", ".pyx", ".pxi.ini", ".pxd")
22+
PATHS_TO_IGNORE: Tuple[str, ...] = ("asv_bench/env",)
2223

2324

2425
def _get_literal_string_prefix_len(token_string: str) -> int:
@@ -333,6 +334,8 @@ def main(
333334
)
334335

335336
for subdir, _, files in os.walk(source_path):
337+
if any(path in subdir for path in PATHS_TO_IGNORE):
338+
continue
336339
for file_name in files:
337340
if not any(
338341
file_name.endswith(extension) for extension in FILE_EXTENSIONS_TO_CHECK

0 commit comments

Comments
 (0)