<#3187 remove check of settings lists in partials>...
# flyte-github
c
#3187 remove check of settings lists in partials Pull request opened by pvditt ## Tracking issue fixes https://linear.app/unionai/issue/BB-3499/cannot-pass-arguments-of-type-list-to-a-partial-function-that-will-be closes: flyteorg/flyte#4325 ## Why are the changes needed? w/ flyteorg/flyte#6322 merged, we can now set lists for partials in map_tasks ## What changes were proposed in this pull request? remove check for list getting set in partials Since this is reliant on a BE change, is there something that we set for ~"min flyte version" or do we need to make this backwards compatible w/ older flyte propeller versions? ## How was this patch tested?
Copy code
from 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/flytekit