Skip to content

Commit 6d5da40

Browse files
committed
fix.
1 parent a238202 commit 6d5da40

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

src/pytask_parallel/backends.py

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

tests/test_jupyter/test_functional_interface.ipynb

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,20 @@
2222
"id": "1",
2323
"metadata": {},
2424
"outputs": [],
25-
"source": "node_text = PythonNode(name=\"text\", hash=True)\n\n\ndef create_text() -> Annotated[str, node_text]:\n return \"This is the text.\"\n\n\nnode_file = PathNode.from_path(Path(\"file.txt\").resolve())\n\n\ndef create_file(text: Annotated[str, node_text]) -> Annotated[str, node_file]:\n return text"
25+
"source": [
26+
"node_text = PythonNode(name=\"text\", hash=True)\n",
27+
"\n",
28+
"\n",
29+
"def create_text() -> Annotated[str, node_text]:\n",
30+
" return \"This is the text.\"\n",
31+
"\n",
32+
"\n",
33+
"node_file = PathNode.from_path(Path(\"file.txt\").resolve())\n",
34+
"\n",
35+
"\n",
36+
"def create_file(text: Annotated[str, node_text]) -> Annotated[str, node_file]:\n",
37+
" return text"
38+
]
2639
},
2740
{
2841
"cell_type": "code",
@@ -57,4 +70,4 @@
5770
},
5871
"nbformat": 4,
5972
"nbformat_minor": 5
60-
}
73+
}

tests/test_jupyter/test_functional_interface_w_relative_path.ipynb

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,20 @@
2222
"id": "1",
2323
"metadata": {},
2424
"outputs": [],
25-
"source": "node_text = PythonNode(name=\"text\", hash=True)\n\n\ndef create_text() -> Annotated[str, node_text]:\n return \"This is the text.\"\n\n\nnode_file = PathNode(name=\"product\", path=Path(\"file.txt\"))\n\n\ndef create_file(text: Annotated[str, node_text]) -> Annotated[str, node_file]:\n return text"
25+
"source": [
26+
"node_text = PythonNode(name=\"text\", hash=True)\n",
27+
"\n",
28+
"\n",
29+
"def create_text() -> Annotated[str, node_text]:\n",
30+
" return \"This is the text.\"\n",
31+
"\n",
32+
"\n",
33+
"node_file = PathNode(name=\"product\", path=Path(\"file.txt\"))\n",
34+
"\n",
35+
"\n",
36+
"def create_file(text: Annotated[str, node_text]) -> Annotated[str, node_file]:\n",
37+
" return text"
38+
]
2639
},
2740
{
2841
"cell_type": "code",
@@ -57,4 +70,4 @@
5770
},
5871
"nbformat": 4,
5972
"nbformat_minor": 5
60-
}
73+
}

0 commit comments

Comments
 (0)