<#1632 Allow annotated FlyteFile as task input arg...
# flyte-github
a
#1632 Allow annotated FlyteFile as task input argument Pull request opened by AdrianoKF TL;DR This PR allows annotated FlyteFiles to be used as input arguments of a task, e.g., when calculating a custom hash using
Annotated[FlyteFile, HashMethod(...)]
. See the discussion on Slack for additional details. Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☑︎ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description Using an annotated FlyteFile type as an input to a task was previously impossible due to an exception being raised in
FlyteFilePathTransformer.to_python_value
. This MR applies the fix previously used in
FlyteFilePathTransformer.to_literal
to permit using annotated FlyteFiles as either inputs or outputs of a task (see MR #1544), by unwrapping the origin type of the annotated type. Tracking Issue flyteorg/flyte#3424 Follow-up issue NA flyteorg/flytekit All checks have passed 30/30 successful checks