|
21 | 21 | import copy |
22 | 22 | import warnings |
23 | 23 | from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence |
24 | | -from typing import TYPE_CHECKING, Any, ClassVar |
| 24 | +from typing import TYPE_CHECKING, Any, ClassVar, Union |
25 | 25 |
|
26 | 26 | import attrs |
27 | 27 | import methodtools |
|
51 | 51 | from airflow.sdk.definitions._internal.types import NOTSET |
52 | 52 | from airflow.serialization.enums import DagAttributeTypes |
53 | 53 | from airflow.task.priority_strategy import PriorityWeightStrategy, validate_and_load_priority_weight_strategy |
54 | | -from airflow.typing_compat import Literal, TypeAlias, TypeGuard |
| 54 | +from airflow.typing_compat import Literal, TypeGuard |
55 | 55 | from airflow.utils.helpers import is_container, prevent_duplicates |
56 | 56 | from airflow.utils.xcom import XCOM_RETURN_KEY |
57 | 57 |
|
|
79 | 79 | from airflow.utils.task_group import TaskGroup |
80 | 80 | from airflow.utils.trigger_rule import TriggerRule |
81 | 81 |
|
82 | | -TaskStateChangeCallbackAttrType: TypeAlias = TaskStateChangeCallback | list[TaskStateChangeCallback] | None |
83 | | -ValidationSource = Literal["expand"] | Literal["partial"] |
| 82 | +TaskStateChangeCallbackAttrType = Union[None, TaskStateChangeCallback, list[TaskStateChangeCallback]] |
| 83 | +ValidationSource = Union[Literal["expand"], Literal["partial"]] |
84 | 84 |
|
85 | 85 |
|
86 | 86 | def validate_mapping_kwargs(op: type[BaseOperator], func: ValidationSource, value: dict[str, Any]) -> None: |
|
0 commit comments