Skip to content

Commit cc0b3bf

Browse files
[pre-commit.ci] pre-commit autoupdate (#117)
1 parent 6969935 commit cc0b3bf

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,13 @@ repos:
2222
- id: python-no-log-warn
2323
- id: python-use-type-annotations
2424
- id: text-unicode-replacement-char
25-
- repo: https://github.com/aio-libs/sort-all
26-
rev: v1.3.0
27-
hooks:
28-
- id: sort-all
2925
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: v0.11.6
26+
rev: v0.12.4
3127
hooks:
3228
- id: ruff
3329
- id: ruff-format
3430
- repo: https://github.com/dosisod/refurb
35-
rev: v2.0.0
31+
rev: v2.1.0
3632
hooks:
3733
- id: refurb
3834
- repo: https://github.com/kynan/nbstripout

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ unsafe-fixes = true
111111

112112
[tool.ruff.lint]
113113
extend-ignore = [
114-
"ANN101", # type annotating self
115-
"ANN102", # type annotating cls
116114
"ANN401", # flake8-annotate typing.Any
117115
"COM812", # Comply with ruff-format.
118116
"ISC001", # Comply with ruff-format.

src/pytask_parallel/backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def submit(
4747
def _get_dask_executor(n_workers: int) -> Executor:
4848
"""Get an executor from a dask client."""
4949
_rich_traceback_guard = True
50-
from pytask import import_optional_dependency
50+
from pytask import import_optional_dependency # noqa: PLC0415
5151

5252
distributed = import_optional_dependency("distributed")
5353
assert distributed # noqa: S101

src/pytask_parallel/execute.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ def pytask_execute_task(session: Session, task: PTask) -> Future[WrapperResult]:
195195

196196
if is_coiled_function(task):
197197
# Prevent circular import for coiled backend.
198-
from pytask_parallel.wrappers import rewrap_task_with_coiled_function
198+
from pytask_parallel.wrappers import ( # noqa: PLC0415
199+
rewrap_task_with_coiled_function,
200+
)
199201

200202
wrapper_func = rewrap_task_with_coiled_function(task)
201203

@@ -219,7 +221,7 @@ def pytask_execute_task(session: Session, task: PTask) -> Future[WrapperResult]:
219221

220222
if worker_type == WorkerType.PROCESSES:
221223
# Prevent circular import for loky backend.
222-
from pytask_parallel.wrappers import wrap_task_in_process
224+
from pytask_parallel.wrappers import wrap_task_in_process # noqa: PLC0415
223225

224226
# Task modules are dynamically loaded and added to `sys.modules`. Thus,
225227
# cloudpickle believes the module of the task function is also importable in the
@@ -242,7 +244,7 @@ def pytask_execute_task(session: Session, task: PTask) -> Future[WrapperResult]:
242244

243245
if worker_type == WorkerType.THREADS:
244246
# Prevent circular import for loky backend.
245-
from pytask_parallel.wrappers import wrap_task_in_thread
247+
from pytask_parallel.wrappers import wrap_task_in_thread # noqa: PLC0415
246248

247249
return session.config["_parallel_executor"].submit(
248250
wrap_task_in_thread, task=task, remote=False, **kwargs

src/pytask_parallel/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def parse_future_result(
5050
future_exception = future.exception()
5151
if future_exception is not None:
5252
# Prevent circular import for loky backend.
53-
from pytask_parallel.wrappers import WrapperResult
53+
from pytask_parallel.wrappers import WrapperResult # noqa: PLC0415
5454

5555
exc_info = _parse_future_exception(future_exception)
5656
return WrapperResult(

src/pytask_parallel/wrappers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ def _patch_set_trace_and_breakpoint() -> None:
189189
a subprocess and print a better exception message.
190190
191191
"""
192-
import pdb # noqa: T100
193-
import sys
192+
import pdb # noqa: PLC0415, T100
193+
import sys # noqa: PLC0415
194194

195195
pdb.set_trace = _raise_exception_on_breakpoint
196196
sys.breakpointhook = _raise_exception_on_breakpoint

0 commit comments

Comments
 (0)