cuddly-jelly-27016
03/12/2025, 8:34 PMfrom flytekit import map_task, task, workflow
import functools
import typing
@task
def demo_task(strings: typing.List[str], num: int) -> str:
return f"{num}".join(strings)
@workflow
def demo_wf(nums: typing.List[int] = [1, 2]) -> None:
map_task(functools.partial(demo_task, strings=["a", "b", "c"]))(num=nums)
[image](https://private-user-images.githubusercontent.com/37558497/422072019-86c9d820-e227-4c38-966e-e87153d089af.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDE5MDY3NjYsIm5iZiI6MTc0MTkwNjQ2NiwicGF0aCI6Ii8zNzU1ODQ5Ny80MjIwNzIwMTktODZjOWQ4MjAtZTIyNy00YzM4LTk2NmUtZTg3MTUzZDA4OWFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzEzVDIyNTQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmYTgwYjgyYTJhZjI0OTdjMmQxNGRjY2MzOTFhY2Y3YmFlMDhmNzgxNjlmYTliY2Y4MTBiNDQ1YWJlYWVkNWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.i1yofzupDrQue7l7P0BU7sY6OQ5bLbbI_DuY1nHqDnQ)
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
### Summary by Bito
This PR removes restrictions that previously prevented lists from being used as inputs to partial tasks in map_tasks, enhancing flexibility. The implementation removes error-raising code for list arguments and updates tests accordingly. It includes renamed test functions and variables to reflect the updated functionality, along with new test cases that verify correct handling of list inputs, aligning with backend updates that now support lists for partial functions.
Unit tests added: True
Estimated effort to review (1-5, lower is better): 1
flyteorg/flytekitcuddly-jelly-27016
03/12/2025, 8:34 PMcuddly-jelly-27016
03/12/2025, 8:38 PMcuddly-jelly-27016
03/13/2025, 10:54 PM