uranusjr commented on code in PR #31565:
URL: https://github.com/apache/airflow/pull/31565#discussion_r1206425467


##########
airflow/serialization/serde.py:
##########
@@ -302,6 +308,11 @@ def _stringify(classname: str, version: int, value: T | 
None) -> str:
     return s
 
 
+def _is_pydantic(cls: Any) -> bool:
+    """Return True if the class is a pydantic model."""
+    return hasattr(cls, "validate") and hasattr(cls, "json") and hasattr(cls, 
"dict")

Review Comment:
   Can we not use `isinstance` here? Pydantic models use subclasses.



-- 
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]

Reply via email to