kaxil commented on code in PR #44843: URL: https://github.com/apache/airflow/pull/44843#discussion_r1881843653
########## airflow/api_fastapi/execution_api/datamodels/taskinstance.py: ########## @@ -137,5 +137,12 @@ class TaskInstance(BaseModel): map_index: int | None = None +"""Defines the types that the RTIF payload's dictionary values can take. These are all JsonAble types """ +JsonAbleValueTypes = Union[ + dict[str, JsonValue], + list[JsonValue], + JsonValue, +] + Review Comment: Actually now you can just remove this entirely and change L148 to use `JsonValue` https://docs.pydantic.dev/2.9/api/types/#pydantic.types.JsonValue It is sufficient for what we want: ``` JsonValue: TypeAlias = Union[ List["JsonValue"], Dict[str, "JsonValue"], str, bool, int, float, None, ] ``` ########## airflow/api_fastapi/execution_api/datamodels/taskinstance.py: ########## @@ -137,5 +137,12 @@ class TaskInstance(BaseModel): map_index: int | None = None +"""Defines the types that the RTIF payload's dictionary values can take. These are all JsonAble types """ +JsonAbleValueTypes = Union[ + dict[str, JsonValue], + list[JsonValue], + JsonValue, +] + Review Comment: Actually now you can just remove this entirely and change L148 to use `JsonValue` https://docs.pydantic.dev/2.9/api/types/#pydantic.types.JsonValue It is sufficient for what we want: ```py JsonValue: TypeAlias = Union[ List["JsonValue"], Dict[str, "JsonValue"], str, bool, int, float, None, ] ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org