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 authored Nov 2, 2023
1 parent 64571ff commit 3ea112a
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 3ea112a

Please sign in to comment.