Skip to content

Commit

Permalink
fix: remove classname
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffreybvn committed Feb 17, 2024
1 parent 9015e3a commit e7be465
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions airflow/serialization/serde.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def serialize(o: object, depth: int = 0) -> U | None:

cls = type(o)
qn = qualname(o)

# serialize namedtuple like tuples
if _is_namedtuple(o):
qn = "builtins.tuple"
Expand All @@ -144,12 +144,12 @@ def serialize(o: object, depth: int = 0) -> U | None:
CLASSNAME: qn,
VERSION: getattr(cls, "__version__", DEFAULT_VERSION),
}

# if there is a builtin serializer available use that
if qn in _serializers:
data, serialized_classname, version, is_serialized = _serializers[qn].serialize(o)
if is_serialized:
return encode(classname or serialized_classname, version, serialize(data, depth + 1))
return encode(serialized_classname, version, serialize(data, depth + 1))

# object / class brings their own
if hasattr(o, "serialize"):
Expand Down

0 comments on commit e7be465

Please sign in to comment.