Skip to content

Commit

Permalink
fix: ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Dec 26, 2024
1 parent c2c0f13 commit 2475697
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 30 deletions.
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fixable = [
"SIM108", # if-else-block-instead-of-if-exp
"I002", # missing-required-import
"RUF100", # unused-noqa
"RUF022", # unsorted-dunder-all
]
[lint.per-file-ignores]
"./src/joblib-stubs/externals/**/*.pyi" = ["F405"]
Expand Down
24 changes: 12 additions & 12 deletions src/joblib-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from joblib._cloudpickle_wrapper import (
wrap_non_picklable_objects as wrap_non_picklable_objects,
)
from joblib.compressor import register_compressor as register_compressor
from joblib.hashing import hash as hash # noqa: A001
from joblib.hashing import hash as hash # noqa: A004
from joblib.logger import Logger as Logger
from joblib.logger import PrintTime as PrintTime
from joblib.memory import MemorizedResult as MemorizedResult
Expand All @@ -20,22 +20,22 @@ from joblib.parallel import parallel_config as parallel_config
from joblib.parallel import register_parallel_backend as register_parallel_backend

__all__ = [
"Memory",
"MemorizedResult",
"PrintTime",
"Logger",
"hash",
"dump",
"load",
"MemorizedResult",
"Memory",
"Parallel",
"delayed",
"PrintTime",
"cpu_count",
"delayed",
"dump",
"effective_n_jobs",
"register_parallel_backend",
"parallel_backend",
"expires_after",
"register_store_backend",
"hash",
"load",
"parallel_backend",
"parallel_config",
"register_compressor",
"register_parallel_backend",
"register_store_backend",
"wrap_non_picklable_objects",
"parallel_config",
]
8 changes: 4 additions & 4 deletions src/joblib-stubs/externals/cloudpickle/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ from .cloudpickle import (
)

__all__ = [
"__version__",
"Pickler",
"CloudPickler",
"dumps",
"loads",
"Pickler",
"__version__",
"dump",
"dumps",
"load",
"loads",
"register_pickle_by_value",
"unregister_pickle_by_value",
]
Expand Down
24 changes: 12 additions & 12 deletions src/joblib-stubs/externals/loky/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from concurrent.futures import FIRST_COMPLETED as FIRST_COMPLETED
from concurrent.futures import FIRST_EXCEPTION as FIRST_EXCEPTION
from concurrent.futures import CancelledError as CancelledError
from concurrent.futures import Executor as Executor
from concurrent.futures import TimeoutError as TimeoutError # noqa: A001
from concurrent.futures import TimeoutError as TimeoutError # noqa: A004
from concurrent.futures import as_completed as as_completed
from concurrent.futures import wait as wait

Expand All @@ -18,19 +18,19 @@ from .process_executor import ProcessPoolExecutor as ProcessPoolExecutor
from .reusable_executor import get_reusable_executor as get_reusable_executor

__all__ = [
"get_reusable_executor",
"cpu_count",
"wait",
"as_completed",
"Future",
"Executor",
"ProcessPoolExecutor",
"ALL_COMPLETED",
"FIRST_COMPLETED",
"FIRST_EXCEPTION",
"BrokenProcessPool",
"CancelledError",
"Executor",
"Future",
"ProcessPoolExecutor",
"TimeoutError",
"FIRST_COMPLETED",
"FIRST_EXCEPTION",
"ALL_COMPLETED",
"wrap_non_picklable_objects",
"as_completed",
"cpu_count",
"get_reusable_executor",
"set_loky_pickler",
"wait",
"wrap_non_picklable_objects",
]
2 changes: 1 addition & 1 deletion src/joblib-stubs/externals/loky/backend/queues.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from typing import Any, Generic
from joblib._typeshed import Reducer
from typing_extensions import TypeVar

__all__ = ["Queue", "SimpleQueue", "Full"]
__all__ = ["Full", "Queue", "SimpleQueue"]

_T = TypeVar("_T")

Expand Down
2 changes: 1 addition & 1 deletion src/joblib-stubs/externals/loky/backend/synchronize.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from typing import Any, Callable
from _typeshed import Incomplete
from typing_extensions import Self, TypeVar

__all__ = ["Lock", "RLock", "Semaphore", "BoundedSemaphore", "Condition", "Event"]
__all__ = ["BoundedSemaphore", "Condition", "Event", "Lock", "RLock", "Semaphore"]

_T = TypeVar("_T")

Expand Down

0 comments on commit 2475697

Please sign in to comment.