@@ -675,8 +675,9 @@ def test_pytree_and_python_node_as_return(runner, tmp_path):
675
675
from typing import Any
676
676
from typing_extensions import Annotated
677
677
from pytask import PythonNode
678
+ from typing import Dict
678
679
679
- def task_example() -> Annotated[dict [str, str], PythonNode(name="result")]:
680
+ def task_example() -> Annotated[Dict [str, str], PythonNode(name="result")]:
680
681
return {"first": "a", "second": "b"}
681
682
"""
682
683
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):
691
692
from typing import Any
692
693
from typing_extensions import Annotated
693
694
from pytask import PythonNode
695
+ from typing import Dict
694
696
695
697
nodes = [
696
698
PythonNode(name="dict"),
697
699
(PythonNode(name="tuple1"), PythonNode(name="tuple2")),
698
700
PythonNode(name="int")
699
701
]
700
702
701
- def task_example() -> Annotated[dict [str, str], nodes]:
703
+ def task_example() -> Annotated[Dict [str, str], nodes]:
702
704
return [{"first": "a", "second": "b"}, (1, 2), 1]
703
705
"""
704
706
tmp_path .joinpath ("task_module.py" ).write_text (textwrap .dedent (source ))
0 commit comments