Skip to content

Commit ac1014c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 53694b3 commit ac1014c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/pytask_parallel/backends.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
from concurrent.futures import ProcessPoolExecutor
99
from concurrent.futures import ThreadPoolExecutor
1010
from enum import Enum
11+
from typing import TYPE_CHECKING
1112
from typing import Any
12-
from typing import Callable
1313
from typing import ClassVar
1414

1515
import cloudpickle
1616
from attrs import define
1717
from loky import get_reusable_executor
1818

19+
if TYPE_CHECKING:
20+
from collections.abc import Callable
21+
1922
__all__ = ["ParallelBackend", "ParallelBackendRegistry", "WorkerType", "registry"]
2023

2124

src/pytask_parallel/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from functools import partial
77
from typing import TYPE_CHECKING
88
from typing import Any
9-
from typing import Callable
109

1110
from pytask import NodeLoadError
1211
from pytask import PNode
@@ -19,6 +18,7 @@
1918
from pytask_parallel.typing import is_local_path
2019

2120
if TYPE_CHECKING:
21+
from collections.abc import Callable
2222
from concurrent.futures import Future
2323
from pathlib import Path
2424
from types import ModuleType

tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
import sys
44
from contextlib import contextmanager
5-
from typing import Callable
5+
from typing import TYPE_CHECKING
66

77
import pytest
88
from click.testing import CliRunner
99
from nbmake.pytest_items import NotebookItem
1010
from pytask import storage
1111

12+
if TYPE_CHECKING:
13+
from collections.abc import Callable
14+
1215

1316
class SysPathsSnapshot:
1417
"""A snapshot for sys.path."""

0 commit comments

Comments
 (0)