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
Related to this issue is the fact that the script decorator fudged up the type hints for the function. The intention of the _take_annotation_from, seen here
was to allow the script decorator itself to set the Script class values, like volumes etc, which does work:
But, the unintended side effect was the function itself lost type hints because I thought I needed to add the Script type hints at the call site as well, but actually this should be the type hints for Step/Task, e.g. when doesn't show up:
because it's using the Script kwargs for the hints, not TemplateInvocatorSubNodeMixin (i.e. Steps/Tasks) kwargs.
Furthermore, types hints for the function itself broke:
Related to this issue is the fact that the
script
decorator fudged up the type hints for the function. The intention of the_take_annotation_from
, seen herehera/src/hera/workflows/script.py
Line 611 in 91df4de
was to allow the script decorator itself to set the
Script
class values, likevolumes
etc, which does work:But, the unintended side effect was the function itself lost type hints because I thought I needed to add the Script type hints at the call site as well, but actually this should be the type hints for Step/Task, e.g.
when
doesn't show up:because it's using the
Script
kwargs for the hints, notTemplateInvocatorSubNodeMixin
(i.e. Steps/Tasks) kwargs.Furthermore, types hints for the function itself broke:
Originally posted by @elliotgunton in #837 (comment)
The text was updated successfully, but these errors were encountered: