Skip to content

Commit 749f90d

Browse files
committed
Fix.
1 parent 1efa739 commit 749f90d

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ select = ["ALL"]
121121
"tests/*" = ["D", "ANN", "PLR2004", "S101"]
122122
"docs/source/conf.py" = ["INP001"]
123123
"docs_src/*" = ["ARG001", "D", "INP001", "S301"]
124-
"src/pytask_parallel/*.py" = ["PLC0415"]
125124

126125
[tool.ruff.lint.isort]
127126
force-single-line = true

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ 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 rewrap_task_with_coiled_function # noqa: PLC0415
199199

200200
wrapper_func = rewrap_task_with_coiled_function(task)
201201

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

220220
if worker_type == WorkerType.PROCESSES:
221221
# Prevent circular import for loky backend.
222-
from pytask_parallel.wrappers import wrap_task_in_process
222+
from pytask_parallel.wrappers import wrap_task_in_process # noqa: PLC0415
223223

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

243243
if worker_type == WorkerType.THREADS:
244244
# Prevent circular import for loky backend.
245-
from pytask_parallel.wrappers import wrap_task_in_thread
245+
from pytask_parallel.wrappers import wrap_task_in_thread # noqa: PLC0415
246246

247247
return session.config["_parallel_executor"].submit(
248248
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)