This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f31f5e4319c Remove unneeded forward-reference quotes from a type alias
(#70580)
f31f5e4319c is described below
commit f31f5e4319c328342a643812189fba0577152734
Author: Andrej730 <[email protected]>
AuthorDate: Wed Jul 29 00:57:19 2026 +0500
Remove unneeded forward-reference quotes from a type alias (#70580)
The names (`SerializedAsset`, `SerializedAssetAlias`,
`SerializedAssetBase`) are imported on the import line right before type alias
definition, so no forward references needed.
The whole block is inside `TYPE_CHECKING`, so it doesn't affect runtime in
any way. But it will help some type checkers (e.g. pyrefly, pyright) that fail
to detect `TYPE_CHECKING` context and flag `"SerializedAsset" |
"SerializedAssetAlias"` as unexpected BitAnd operation between two string
literals.
---
airflow-core/src/airflow/models/dag.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow-core/src/airflow/models/dag.py
b/airflow-core/src/airflow/models/dag.py
index f8277856104..29407e53bb0 100644
--- a/airflow-core/src/airflow/models/dag.py
+++ b/airflow-core/src/airflow/models/dag.py
@@ -97,8 +97,8 @@ if TYPE_CHECKING:
ScheduleArg = (
ScheduleInterval
| Timetable
- | "SerializedAssetBase"
- | Collection["SerializedAsset" | "SerializedAssetAlias"]
+ | SerializedAssetBase
+ | Collection[SerializedAsset | SerializedAssetAlias]
)
log = structlog.getLogger(__name__)