ashb commented on a change in pull request #20795:
URL: https://github.com/apache/airflow/pull/20795#discussion_r782097858
##########
File path: airflow/api/common/experimental/mark_tasks.py
##########
@@ -194,13 +196,15 @@ def get_subdag_runs(
current_task = current_dag.get_task(task_id)
if isinstance(current_task, SubDagOperator) or
current_task.task_type == "SubDagOperator":
+ if TYPE_CHECKING:
+ assert current_task.subdag
Review comment:
I'm more than happy to have the assert without the `if` -- I think the
main point of avoiding asserts at runtime is that the code must continue to
function if the assert was never run (and so for most people the easiest thing
is to avoid them entirely)
--
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]