Skip to content

Commit 1a2145b

Browse files
committed
Fix.
1 parent 91290f9 commit 1a2145b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/test_collect_command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,15 @@ def test_more_nested_pytree_and_python_node_as_return(runner, tmp_path):
619619
from typing import Any
620620
from typing_extensions import Annotated
621621
from pytask import PythonNode
622+
from typing import Dict
622623
623624
nodes = [
624625
PythonNode(name="dict"),
625626
(PythonNode(name="tuple1"), PythonNode(name="tuple2")),
626627
PythonNode(name="int")
627628
]
628629
629-
def task_example() -> Annotated[dict[str, str], nodes]:
630+
def task_example() -> Annotated[Dict[str, str], nodes]:
630631
return [{"first": "a", "second": "b"}, (1, 2), 1]
631632
"""
632633
tmp_path.joinpath("task_module.py").write_text(textwrap.dedent(source))

tests/test_execute.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,9 @@ def test_pytree_and_python_node_as_return(runner, tmp_path):
675675
from typing import Any
676676
from typing_extensions import Annotated
677677
from pytask import PythonNode
678+
from typing import Dict
678679
679-
def task_example() -> Annotated[dict[str, str], PythonNode(name="result")]:
680+
def task_example() -> Annotated[Dict[str, str], PythonNode(name="result")]:
680681
return {"first": "a", "second": "b"}
681682
"""
682683
tmp_path.joinpath("task_module.py").write_text(textwrap.dedent(source))
@@ -691,14 +692,15 @@ def test_more_nested_pytree_and_python_node_as_return(runner, tmp_path):
691692
from typing import Any
692693
from typing_extensions import Annotated
693694
from pytask import PythonNode
695+
from typing import Dict
694696
695697
nodes = [
696698
PythonNode(name="dict"),
697699
(PythonNode(name="tuple1"), PythonNode(name="tuple2")),
698700
PythonNode(name="int")
699701
]
700702
701-
def task_example() -> Annotated[dict[str, str], nodes]:
703+
def task_example() -> Annotated[Dict[str, str], nodes]:
702704
return [{"first": "a", "second": "b"}, (1, 2), 1]
703705
"""
704706
tmp_path.joinpath("task_module.py").write_text(textwrap.dedent(source))

0 commit comments

Comments
 (0)