Skip to content

Commit 10729bd

Browse files
committed
added check for no fspaths being provided to a fileset
1 parent 434f921 commit 10729bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fileformats/core/fileset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def __init__(
101101
metadata: ty.Optional[ty.Dict[str, ty.Any]] = None,
102102
**load_kwargs: ty.Any,
103103
):
104+
if not fspaths:
105+
raise ValueError("No file-system paths provided to FileSet")
104106
self._explicit_metadata = metadata
105107
self._load_kwargs = load_kwargs
106108
self._validate_class()
@@ -800,7 +802,7 @@ def byte_chunks(
800802
rel_path: str
801803
relative path to either 'relative_to' arg or common base path for each file
802804
in the file set
803-
byte_iter : Generator[bytes]
805+
byte_iter : Generator[bytes, None, None]
804806
an iterator over the bytes contents of the file, chunked into 'chunk_len'
805807
chunks
806808
"""

0 commit comments

Comments
 (0)