Skip to content

Commit 9ab4cbf

Browse files
fix: type hint of load_one_doc can be a list of string in case of error
Signed-off-by: thiswillbeyourgithub <[email protected]>
1 parent 5f7fcf4 commit 9ab4cbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wdoc/utils/loaders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def load_one_doc(
440440
recur_parent_id: str = None, # just used to keep track of which document comes from which recursive filetype
441441
subitem_link: str = None,
442442
**kwargs,
443-
) -> List[Document]:
443+
) -> List[Union[Document, str]]: # returns a str if an error happened
444444
"""choose the appropriate loader for a file, then load it,
445445
split into documents, add some metadata then return.
446446
The loader is cached"""

0 commit comments

Comments
 (0)