Skip to content

Commit c3bb83b

Browse files
feat: Add dataset typing
1 parent 7bcba2a commit c3bb83b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/thread/_types.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Documentation: https://thread.ngjx.org/docs/v1.0.0
55
"""
66

7-
from typing import Any, Literal, Callable, Union, Sized
7+
from typing import Any, Literal, Callable, Union, Sized, Sequence
88
from typing_extensions import (
99
ParamSpec,
1010
TypeVar,
@@ -57,3 +57,11 @@ def __getitem__(self, i: int) -> _Dataset_T: ...
5757
@runtime_checkable
5858
class SupportsLengthGetItem(SupportsGetItem[_Dataset_T], SupportsLength, Protocol):
5959
pass
60+
61+
62+
Dataset = Union[
63+
Sequence[_Dataset_T],
64+
SupportsLength,
65+
SupportsGetItem[_Dataset_T],
66+
SupportsLengthGetItem[_Dataset_T],
67+
]

0 commit comments

Comments
 (0)