Skip to content

chore(deps-dev): bump ruff from 0.1.15 to 0.4.5 #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ importlib-metadata = { version = ">=4.4", python = "<3.10" }

[tool.poetry.group.dev.dependencies]
pytest = ">=7.4.3,<9.0.0"
ruff = "^0.1.5"
ruff = ">=0.1.5,<0.5.0"

[build-system]
requires = ["poetry-core"]
Expand Down
9 changes: 3 additions & 6 deletions src/thread/decorators/_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
@overload
def processor(
__function: TargetFunction[_DataT, _TargetP, _TargetT],
) -> NoParamReturn[_DataT, _TargetP, _TargetT]:
...
) -> NoParamReturn[_DataT, _TargetP, _TargetT]: ...


@overload
Expand All @@ -54,8 +53,7 @@ def processor(
ignore_errors: Sequence[type[Exception]] = (),
suppress_errors: bool = False,
**overflow_kwargs: Overflow_In,
) -> WithParamReturn[_DataT, _TargetP, _TargetT]:
...
) -> WithParamReturn[_DataT, _TargetP, _TargetT]: ...


@overload
Expand All @@ -67,8 +65,7 @@ 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(
Expand Down
9 changes: 3 additions & 6 deletions src/thread/decorators/_threaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@


@overload
def threaded(__function: TargetFunction[P, T]) -> NoParamReturn[P, T]:
...
def threaded(__function: TargetFunction[P, T]) -> NoParamReturn[P, T]: ...


@overload
Expand All @@ -33,8 +32,7 @@ def threaded(
ignore_errors: Sequence[type[Exception]] = (),
suppress_errors: bool = False,
**overflow_kwargs: Overflow_In,
) -> WithParamReturn[P, T]:
...
) -> WithParamReturn[P, T]: ...


@overload
Expand All @@ -46,8 +44,7 @@ def threaded(
ignore_errors: Sequence[type[Exception]] = (),
suppress_errors: bool = False,
**overflow_kwargs: Overflow_In,
) -> FullParamReturn[P, T]:
...
) -> FullParamReturn[P, T]: ...


def threaded(
Expand Down
12 changes: 4 additions & 8 deletions src/thread/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ 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
Expand All @@ -385,8 +384,7 @@ 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
Expand All @@ -399,8 +397,7 @@ 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
Expand All @@ -413,8 +410,7 @@ def __init__(
_get_value: Callable[[Any, int], _Dataset_T],
_length: Union[int, Callable[[Any], int]],
**overflow_kwargs: Overflow_In,
) -> None:
...
) -> None: ...

def __init__(
self,
Expand Down
6 changes: 2 additions & 4 deletions tests/test_dataframe_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ 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'
Expand Down