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 a3183ce8e69 fix: mypy error in dagbag.py (#58483)
a3183ce8e69 is described below
commit a3183ce8e6909e9e2562ba38fca8c96ca9812a5d
Author: arnoldmr01 <[email protected]>
AuthorDate: Wed Nov 19 06:14:33 2025 -0500
fix: mypy error in dagbag.py (#58483)
---
airflow-core/src/airflow/models/dagbag.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow-core/src/airflow/models/dagbag.py
b/airflow-core/src/airflow/models/dagbag.py
index 5c0d1288195..d1e93217473 100644
--- a/airflow-core/src/airflow/models/dagbag.py
+++ b/airflow-core/src/airflow/models/dagbag.py
@@ -66,13 +66,13 @@ class DBDagBag:
return self._read_dag(serdag)
@staticmethod
- def _version_from_dag_run(dag_run: DagRun, *, session: Session) ->
DagVersion:
+ def _version_from_dag_run(dag_run: DagRun, *, session: Session) ->
DagVersion | None:
if not dag_run.bundle_version:
if dag_version :=
DagVersion.get_latest_version(dag_id=dag_run.dag_id, session=session):
return dag_version
# Check if created_dag_version relationship is already loaded to avoid
DetachedInstanceError
- info = inspect(dag_run)
+ info: Any = inspect(dag_run)
if info.attrs.created_dag_version.loaded_value is not NO_VALUE:
# Relationship is already loaded, safe to access
return dag_run.created_dag_version