diff --git a/src/thread/decorators/_processor.py b/src/thread/decorators/_processor.py index dd9ee89..50dabc0 100644 --- a/src/thread/decorators/_processor.py +++ b/src/thread/decorators/_processor.py @@ -44,7 +44,8 @@ @overload def processor( __function: TargetFunction[_DataT, _TargetP, _TargetT], -) -> NoParamReturn[_DataT, _TargetP, _TargetT]: ... +) -> NoParamReturn[_DataT, _TargetP, _TargetT]: + ... @overload @@ -55,7 +56,8 @@ def processor( ignore_errors: Sequence[type[Exception]] = (), suppress_errors: bool = False, **overflow_kwargs: Overflow_In, -) -> WithParamReturn[_DataT, _TargetP, _TargetT]: ... +) -> WithParamReturn[_DataT, _TargetP, _TargetT]: + ... @overload @@ -67,7 +69,8 @@ def processor( ignore_errors: Sequence[type[Exception]] = (), suppress_errors: bool = False, **overflow_kwargs: Overflow_In, -) -> FullParamReturn[_DataT, _TargetP, _TargetT]: ... +) -> FullParamReturn[_DataT, _TargetP, _TargetT]: + ... def processor( diff --git a/src/thread/decorators/_threaded.py b/src/thread/decorators/_threaded.py index 6f628e2..8c04ee0 100644 --- a/src/thread/decorators/_threaded.py +++ b/src/thread/decorators/_threaded.py @@ -23,7 +23,8 @@ @overload -def threaded(__function: TargetFunction[P, T]) -> NoParamReturn[P, T]: ... +def threaded(__function: TargetFunction[P, T]) -> NoParamReturn[P, T]: + ... @overload @@ -34,7 +35,8 @@ def threaded( ignore_errors: Sequence[type[Exception]] = (), suppress_errors: bool = False, **overflow_kwargs: Overflow_In, -) -> WithParamReturn[P, T]: ... +) -> WithParamReturn[P, T]: + ... @overload @@ -46,7 +48,8 @@ def threaded( ignore_errors: Sequence[type[Exception]] = (), suppress_errors: bool = False, **overflow_kwargs: Overflow_In, -) -> FullParamReturn[P, T]: ... +) -> FullParamReturn[P, T]: + ... def threaded( diff --git a/src/thread/thread.py b/src/thread/thread.py index 3d2e4d2..0aa7590 100644 --- a/src/thread/thread.py +++ b/src/thread/thread.py @@ -373,7 +373,8 @@ def __init__( _get_value: Optional[Callable[[LengthandGetLike_T, int], _Dataset_T]] = None, _length: Optional[Union[int, Callable[[Any], int]]] = None, **overflow_kwargs: Overflow_In, - ) -> None: ... + ) -> None: + ... # Has __len__, require _get_value to be set @overload @@ -386,7 +387,8 @@ def __init__( _get_value: Callable[[LengthLike_T, int], _Dataset_T], _length: Optional[Union[int, Callable[[Any], int]]] = None, **overflow_kwargs: Overflow_In, - ) -> None: ... + ) -> None: + ... # Has __getitem__, require _length to be set @overload @@ -399,7 +401,8 @@ def __init__( _get_value: Optional[Callable[[GetLike_T, int], _Dataset_T]] = None, _length: Union[int, Callable[[GetLike_T], int]], **overflow_kwargs: Overflow_In, - ) -> None: ... + ) -> None: + ... # Does not support __getitem__ and __len__ @overload @@ -412,7 +415,8 @@ def __init__( _get_value: Callable[[Any, int], _Dataset_T], _length: Union[int, Callable[[Any], int]], **overflow_kwargs: Overflow_In, - ) -> None: ... + ) -> None: + ... def __init__( self, diff --git a/tests/test_dataframe_compatibility.py b/tests/test_dataframe_compatibility.py index efa0ef8..80406c3 100644 --- a/tests/test_dataframe_compatibility.py +++ b/tests/test_dataframe_compatibility.py @@ -33,11 +33,14 @@ def __init__(self, length: typing.Any, dataset: list): class DummyUnlikeSequence1: - def __init__(self) -> None: ... + def __init__(self) -> None: + ... class DummyUnlikeSequence2: - def __init__(self) -> None: ... + def __init__(self) -> None: + ... + def __str__(self) -> str: return 'invalid'