Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 8, 2024
1 parent ad06838 commit 18bfa7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/jupyter-ai/jupyter_ai/document_loaders/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def path_to_doc(path):
}



def split_document(document, splitter: TextSplitter) -> List[Document]:
return splitter.split_documents([document])

Expand Down Expand Up @@ -83,7 +82,7 @@ def split(path, all_files: bool, splitter):
for filename in filenames:
filepath = Path(os.path.join(dir, filename))
# Lower case everything to make sure file extension comparisons are not case sensitive
if filepath.suffix.lower() not in set(j.lower() for j in SUPPORTED_EXTS):
if filepath.suffix.lower() not in {j.lower() for j in SUPPORTED_EXTS}:
continue

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

0 comments on commit 18bfa7f

Please sign in to comment.