gopidesupavan commented on code in PR #53004:
URL: https://github.com/apache/airflow/pull/53004#discussion_r2191777172


##########
airflow-core/src/airflow/serialization/serde.py:
##########
@@ -284,7 +284,12 @@ def deserialize(o: T | None, full=True, type_hint: Any = 
None) -> object:
                 class_version,
             )
 
-        return cls(**deserialize(value))
+        deserialize_value = deserialize(value)
+        if not isinstance(deserialize_value, dict):
+            raise TypeError(
+                f"deserialized value for {classname} is not a dict, got 
{type(deserialize_value)}"
+            )
+        return cls(**deserialize_value)  # type: ignore[operator]

Review Comment:
   mypy is treating dataclass not callable 🤔
   ```
   error: "DataclassInstance"
   not callable  [operator]
               return cls(**deserialize_value)
   ```



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