|
21 | 21 | from abc import ABCMeta, abstractmethod |
22 | 22 | from collections.abc import Sequence |
23 | 23 | from datetime import datetime |
24 | | -from typing import TYPE_CHECKING, Any |
| 24 | +from typing import TYPE_CHECKING |
25 | 25 |
|
26 | 26 | from airflow.sdk._shared.dagnode.node import GenericDAGNode |
27 | 27 | from airflow.sdk.definitions._internal.mixins import DependencyMixin |
|
31 | 31 | from airflow.sdk.definitions.edges import EdgeModifier |
32 | 32 | from airflow.sdk.definitions.taskgroup import TaskGroup # noqa: F401 |
33 | 33 | from airflow.sdk.types import Operator # noqa: F401 |
34 | | - from airflow.serialization.enums import DagAttributeTypes |
35 | 34 |
|
36 | 35 |
|
37 | 36 | KEY_REGEX = re.compile(r"^[\w.-]+$") |
@@ -157,18 +156,6 @@ def set_upstream( |
157 | 156 | """Set a node (or nodes) to be directly upstream from the current node.""" |
158 | 157 | self._set_relatives(task_or_task_list, upstream=True, edge_modifier=edge_modifier) |
159 | 158 |
|
160 | | - def serialize_for_task_group(self) -> tuple[DagAttributeTypes, Any]: |
| 159 | + def serialize_for_task_group(self) -> list: |
161 | 160 | """Serialize a task group's content; used by TaskGroupSerialization.""" |
162 | 161 | raise NotImplementedError() |
163 | | - |
164 | | - def match_serialize_task_group_form(self) -> list: |
165 | | - """ |
166 | | - Match the serialized task_group format modified during inter-process communication. |
167 | | -
|
168 | | - The serialized task_group from dag-process gets modified during inter-process communication. |
169 | | - (<DagAttributeTypes.OP: 'operator'>, 'task_id') -> ['operator', 'task_id'] |
170 | | -
|
171 | | - This function aligns the values to match the modified state after IPC. |
172 | | - """ |
173 | | - serialized_task_group = self.serialize_for_task_group() |
174 | | - return [serialized_task_group[0].value, serialized_task_group[1]] |
0 commit comments