You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Tuple[foo, bar] type hints on @task decorated functions #15813
#8996 described the use of type hints to indicate multiple outputs for tasks created with @task. The Dict type hint was delivered in #10349. Tuple was left out of that PR (see here).
I'm creating this issue so that we can discuss whether Tuple support should be added (described here), or whether its omission from #10349 means that it shouldn't be added at all.
The Argument
I think that its omission leaves the user in an awkward position. The TaskFlow mindset extends very naturally to tuples:
@taskdefreturn_two() ->Tuple[str, int]:
return"nine", 6@dagdo_stuff():
a, b=return_two()
print_one(a)
print_another(b)
Without them you need extra object references to structure your dag. You also need extra names to explicitly pull the xcoms that you implicitly pushed, which feels a bit lopsided. Without tuple support, I guess it would go something like this:
Activity