We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bd7307 commit 5bbca75Copy full SHA for 5bbca75
pydra/engine/task.py
@@ -159,8 +159,8 @@ def __init__(
159
return_info = func.__annotations__["return"]
160
# e.g. python annotation: fun() -> ty.NamedTuple("Output", [("out", float)])
161
# or pydra decorator: @pydra.mark.annotate({"return": ty.NamedTuple(...)})
162
- if hasattr(return_info, "__name__") and hasattr(
163
- return_info, "__annotations__"
+ if hasattr(return_info, "__name__") and getattr(
+ return_info, "__annotations__", None
164
):
165
name = return_info.__name__
166
fields = list(return_info.__annotations__.items())
0 commit comments