Skip to content

Commit 12d21f3

Browse files
+ Improved type safety with ParamSpec and TypeVar
1 parent 0a2577f commit 12d21f3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/thread/_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
# Function types
3131
_Target_P = ParamSpec('_Target_P')
3232
_Target_T = TypeVar('_Target_T')
33-
_Dataset_T = TypeVar('_Dataset_T')
34-
3533
TargetFunction = Callable[_Target_P, _Target_T]
3634

3735
HookFunction = Callable[[_Target_T], Union[Any, None]]
36+
37+
_Dataset_T = TypeVar('_Dataset_T')
38+
DatasetFunction = Callable[[_Dataset_T], _Target_T]

0 commit comments

Comments
 (0)