turbaszek commented on a change in pull request #10153:
URL: https://github.com/apache/airflow/pull/10153#discussion_r484262568
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -625,3 +647,69 @@ def from_dict(cls, serialized_obj: dict) ->
'SerializedDAG':
if ver != cls.SERIALIZER_VERSION:
raise ValueError("Unsure how to deserialize version
{!r}".format(ver))
return cls.deserialize_dag(serialized_obj['dag'])
+
+
+class SerializedTaskGroup(TaskGroup, BaseSerialization):
+ """
+ A JSON serializable representation of TaskGroup.
+ """
+ @classmethod
+ def serialize_task_group(cls, task_group: TaskGroup) ->
Optional[Union[Dict[str, Any]]]:
+ """Serializes TaskGroup into a JSON object.
Review comment:
```suggestion
"""
Serializes TaskGroup into a JSON object.
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]