uranusjr commented on code in PR #58581:
URL: https://github.com/apache/airflow/pull/58581#discussion_r2558081398


##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -506,15 +509,17 @@ def get_latest_serialized_dags(
             .group_by(cls.dag_id)
             .subquery()
         )
-        latest_serdags = session.scalars(
-            select(cls)
-            .join(
-                latest_serdag_subquery,
-                cls.created_at == latest_serdag_subquery.c.created_at,
-            )
-            .where(cls.dag_id.in_(dag_ids))
-        ).all()
-        return latest_serdags or []
+        latest_serdags: list[SerializedDagModel] = list(
+            session.scalars(
+                select(cls)
+                .join(
+                    latest_serdag_subquery,
+                    cls.created_at == latest_serdag_subquery.c.created_at,
+                )
+                .where(cls.dag_id.in_(dag_ids))
+            ).all()
+        )

Review Comment:
   Please do not do this. Change the return annotation to 
Sequence[SerializedDagModel] instead.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to