<#6474 [BUG] Local testing using optional dicts wi...
# flyte-github
c
#6474 [BUG] Local testing using optional dicts with optional values does not work Issue created by thomas-maschler ### Describe the bug When attempting to test tasks locally, FlyteKit appears to lack support for certain data types. I cannot test tasks that use optional dictionaries, with optional list values types (ie
dict[str, list[str] | None] | None
). Hower, when running such task on the cluster it works. ### Expected behavior The behavior of local tests should be similar to the behavior on the cluster. optional dictionaries, with optional list values types should be supported. ### Additional context to reproduce from flytekit import task # Defining an optional dict with list[str] values works @task def basic_task(data: dict[str, list[str]] | None) -> None: return def test_basic_task(): result = basic_task(data={"key": ["value1", "value2"]}) assert result is None # Defining an dict with optional list[str] values works @task def optional_task(data: dict[str, list[str] | None] ) -> None: return def test_optional_task(): result = optional_task(data={"key": ["value1", "value2"]}) assert result is None # Defining an optional dict with optional list[str] values # DOES NOT work locally, but it does work on a cluster @task def complex_task(data: dict[str, list[str] | None] | None) -> None: return def test_complex_task(): result = complex_task(data={"key": ["value1", "value2"]}) assert result is None ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte