henry3260 opened a new pull request, #72332:
URL: https://github.com/apache/airflow/pull/72332
## Why
The second bundle loop in `get_bagged_dag` ends with:
```python
if dag := dagbag.dags.get(dag_id):
return dag
if dag:
break
```
The walrus assignment returns as soon as a Dag is found, so `if dag:` is
only ever reached when `dag` is falsy — the `break` cannot run. The first
bundle loop in the same function already uses the plain early return, so
removing it also makes the two loops read the same way.
## What
- `airflow-core/src/airflow/utils/cli.py`: dropped the unreachable `if dag:
break` from `get_bagged_dag`. No behavior change — the intent (stop searching
once the Dag is found) is already served by the `return`, so no tests are added.
--
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]