jedcunningham commented on code in PR #46849:
URL: https://github.com/apache/airflow/pull/46849#discussion_r1992805914


##########
airflow/cli/commands/remote_commands/dag_command.py:
##########
@@ -576,6 +609,29 @@ def _render_dagrun(dr: DagRun) -> dict[str, str]:
     AirflowConsole().print_as(data=dag_runs, output=args.output, 
mapper=_render_dagrun)
 
 
+def _parse_and_get_dag(dag_id: str) -> DAG | None:
+    """Given a dag_id, determine the bundle and relative fileloc from the db, 
then parse and return the DAG."""
+    db_dag = get_dag(subdir=None, dag_id=dag_id, from_db=True)

Review Comment:
   It's already checked 
[here](https://github.com/apache/airflow/blob/a3435f11bbf2c2c487ec1be53e21ab574f119b61/airflow/utils/cli.py#L284),
 and the typing on `get_dag` does say `DAG`, not `DAG | None`.



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