diff --git a/api/data_pipeline.py b/api/data_pipeline.py index 67b2dcbf..458c8fa3 100644 --- a/api/data_pipeline.py +++ b/api/data_pipeline.py @@ -249,7 +249,7 @@ def should_process_file(file_path: str, use_inclusion: bool, included_dirs: List # Check if file is in an included directory if included_dirs: for included in included_dirs: - clean_included = included.strip("./").rstrip("/") + clean_included = included.removeprefix("./").removesuffix("/") if clean_included in file_path_parts: is_included = True break @@ -278,7 +278,7 @@ def should_process_file(file_path: str, use_inclusion: bool, included_dirs: List # Check if file is in an excluded directory for excluded in excluded_dirs: - clean_excluded = excluded.strip("./").rstrip("/") + clean_excluded = excluded.removeprefix("./").removesuffix("/") if clean_excluded in file_path_parts: is_excluded = True break