You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/10/29 10:32:44 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #19303: Use enum for "__var" and "__type" members
uranusjr commented on a change in pull request #19303:
URL: https://github.com/apache/airflow/pull/19303#discussion_r739121778
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -158,11 +158,11 @@ def _decode_timetable(var: Dict[str, Any]) -> Timetable:
Most of the deserialization logic is delegated to the actual type, which
we import from string.
"""
- importable_string = var["__type"]
+ importable_string = var[Encoding.TYPE]
timetable_class = _get_registered_timetable(importable_string)
if timetable_class is None:
raise _TimetableNotRegistered(importable_string)
- return timetable_class.deserialize(var["__var"])
+ return timetable_class.deserialize(var["Encoding.VAR])
Review comment:
```suggestion
return timetable_class.deserialize(var[Encoding.VAR])
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org