Skip to content

Commit 5bbca75

Browse files
authored
small edit to fix py3.10
1 parent 2bd7307 commit 5bbca75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydra/engine/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ def __init__(
159159
return_info = func.__annotations__["return"]
160160
# e.g. python annotation: fun() -> ty.NamedTuple("Output", [("out", float)])
161161
# or pydra decorator: @pydra.mark.annotate({"return": ty.NamedTuple(...)})
162-
if hasattr(return_info, "__name__") and hasattr(
163-
return_info, "__annotations__"
162+
if hasattr(return_info, "__name__") and getattr(
163+
return_info, "__annotations__", None
164164
):
165165
name = return_info.__name__
166166
fields = list(return_info.__annotations__.items())

0 commit comments

Comments
 (0)