ColtenOuO opened a new pull request, #66291: URL: https://github.com/apache/airflow/pull/66291
## Summary Replaces all five remaining `FURB129` violations: `for line in f.readlines()` → `for line in f`. File objects are iterable and yield lines lazily, while `readlines()` reads the entire file into a list before iteration starts. ## Why Reference: [ruff FURB129 — readlines-in-for](https://docs.astral.sh/ruff/rules/readlines-in-for/). - [`dev/airflow_perf/sql_queries.py:148`](https://github.com/apache/airflow/blob/main/dev/airflow_perf/sql_queries.py#L148) filters lines with `if is_query(line)` — non-matching lines never need to be in memory. - [`dev/breeze/src/airflow_breeze/global_constants.py:673`](https://github.com/apache/airflow/blob/main/dev/breeze/src/airflow_breeze/global_constants.py#L673) returns on the first match — the rest of the Dockerfile is no longer read. The remaining three sites store all lines in a list anyway, so memory usage is equivalent — those changes are just for idiom consistency ## Verification - `ruff check --select FURB129 .` → `All checks passed!` -- 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]
