Skip to content

Commit 4175792

Browse files
feat: Ensure non-empty dataset
1 parent 638d478 commit 4175792

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/thread/thread.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,10 @@ def __init__(
368368
369369
Raises
370370
------
371+
AssertionError: invalid `dataset`
371372
AssertionError: invalid `max_threads`
372373
"""
374+
assert len(dataset) > 0, 'dataset cannot be empty'
373375
assert 0 <= max_threads, 'max_threads cannot be set to 0'
374376

375377
self._threads = []

0 commit comments

Comments
 (0)