Lee-W commented on code in PR #74695:
URL: https://github.com/apache/airflow/pull/74695#discussion_r4348576951
##########
providers/common/ai/tests/unit/common/ai/utils/test_output_type.py:
##########
@@ -16,28 +16,53 @@
# under the License.
from __future__ import annotations
+import json
from collections import deque
from collections.abc import Sequence
from dataclasses import dataclass
+from datetime import UTC, datetime
from enum import Enum
+from pathlib import Path
from typing import Annotated, Literal, NamedTuple
+from unittest import mock
import pytest
-from pydantic import BaseModel, ConfigDict, Field, computed_field,
model_validator
+from pydantic import BaseModel, ConfigDict, Field, HttpUrl, computed_field,
model_validator
from pydantic_ai import NativeOutput, PromptedOutput, ToolOutput
from airflow.providers.common.ai.exceptions import
ReviewedOutputValidationError
from airflow.providers.common.ai.utils.output_type import (
_is_container_mismatch,
+ dump_output_for_xcom,
dump_output_to_json,
+ is_model_dump_required,
rehydrate_pydantic_output,
)
+from airflow.sdk.serde import deserialize, serialize
Review Comment:
Moved `deserialize` and `serialize` into the `try` block. The tests that use
them are already gated by `requires_walker` / `requires_typed_xcom`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]