Skip to content

Commit d6668ea

Browse files
author
Gerit Wagner
committed
sources: skip temp. files
1 parent c679a40 commit d6668ea

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

colrev/ops/search.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,23 @@ def get_new_search_files(self) -> list[Path]:
286286
f
287287
for f in files
288288
if f not in [s.filename for s in self.review_manager.settings.sources]
289-
and not str(f).endswith("_query.txt")
290-
and not str(f).endswith(".tmp")
289+
and not str(f).endswith(
290+
(
291+
"_query.txt",
292+
".tmp",
293+
".Identifier",
294+
".bak",
295+
".swp",
296+
".swo",
297+
".log",
298+
".out",
299+
".pyc",
300+
)
301+
)
291302
and ".~lock" not in str(f)
303+
and not f.name.startswith(".")
304+
and "__pycache__" not in str(f)
305+
and ".ipynb_checkpoints" not in str(f)
292306
]
293307

294308
return sorted(list(set(files)))

0 commit comments

Comments
 (0)