Skip to content

Commit

Permalink
Update packages/jupyter-ai/jupyter_ai/document_loaders/directory.py
Browse files Browse the repository at this point in the history
Co-authored-by: Piyush Jain <[email protected]>
  • Loading branch information
JasonWeill and 3coins committed Nov 2, 2023
1 parent 0315690 commit 8a1f8c9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/jupyter-ai/jupyter_ai/document_loaders/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@ def split(path, all: bool, splitter):
continue

for filename in filenames:
filepath = Path(os.path.join(dir, filename))
if filepath.suffix not in SUPPORTED_EXTS:
if not all and filename.startswith("."):
continue

# Unless we're learning "all" files, exclude hidden files
if all is False and filepath.name[0] == ".":
filepath = Path(os.path.join(dir, filename))
if filepath.suffix not in SUPPORTED_EXTS:
continue

document = dask.delayed(path_to_doc)(filepath)
Expand Down

0 comments on commit 8a1f8c9

Please sign in to comment.