Skip to content

Commit

Permalink
Remove redundant parentheses in serialized_objects.py (apache#10966)
Browse files Browse the repository at this point in the history
`elif isinstance(var, (Timezone)):` -> `elif isinstance(var, Timezone):`
  • Loading branch information
kaxil authored Sep 17, 2020
1 parent e066260 commit 284c373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/serialization/serialized_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _serialize(cls, var: Any) -> Any: # Unfortunately there is no support for r
return cls._encode(var.timestamp(), type_=DAT.DATETIME)
elif isinstance(var, datetime.timedelta):
return cls._encode(var.total_seconds(), type_=DAT.TIMEDELTA)
elif isinstance(var, (Timezone)):
elif isinstance(var, Timezone):
return cls._encode(str(var.name), type_=DAT.TIMEZONE)
elif isinstance(var, relativedelta.relativedelta):
encoded = {k: v for k, v in var.__dict__.items() if not k.startswith("_") and v}
Expand Down

0 comments on commit 284c373

Please sign in to comment.