Skip to content

Commit

Permalink
do the same filter in utils
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Jul 2, 2024
1 parent 95ba458 commit 513ea14
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion buildingmotif/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,12 @@ def get_ontology_files(directory: Path, recursive: bool = True) -> List[Path]:
searches = (directory.rglob(f"{pat}") for pat in patterns)
else:
searches = (directory.glob(f"{pat}") for pat in patterns)
return list(chain.from_iterable(searches))
# filter out files in .ipynb_checkpoints
filtered_searches = (
filter(lambda x: ".ipynb_checkpoints" not in Path(x).parts, search)
for search in searches
)
return list(chain.from_iterable(filtered_searches))


def get_template_parts_from_shape(
Expand Down

0 comments on commit 513ea14

Please sign in to comment.