Skip to content

Conversation

@dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Jun 6, 2025

Note that the preview behavior was not documented (shame on us!) so the documentation was not modified.

@dylwil3 dylwil3 added this to the v0.12 milestone Jun 6, 2025
@dylwil3 dylwil3 added rule Implementing or modifying a lint rule fixes Related to suggested fixes for violations labels Jun 6, 2025
Comment on lines +129 to +132
// https://github.com/astral-sh/ruff/pull/18208
pub(crate) const fn is_multiple_with_statements_fix_safe_enabled(
settings: &LinterSettings,
) -> bool {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the main change: just noticed this was missing a PR link and the prefix is_. This also accounts for the change in flake8_simplify/rules/ast_with.rs

@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 5f1af44 to 11966be Compare June 6, 2025 14:14
ntBre and others added 3 commits June 6, 2025 09:28
Summary
--

Release branch for Ruff 0.12.0

TODOs
--

- [ ] Drop empty first commit
- [ ] Merge with rebase-merge (**don't squash merge!!!!**)
@dylwil3 dylwil3 force-pushed the dylan/stabilize-readlines-fix-safe branch from 78e13e3 to 2e4e0f7 Compare June 6, 2025 14:28
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +10 -0 fixes in 1 projects; 54 projects unchanged)

apache/airflow (+0 -0 violations, +10 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --no-preview --select ALL

- dev/airflow_perf/sql_queries.py:145:41: FURB129 Instead of calling `readlines()`, iterate over file object directly
+ dev/airflow_perf/sql_queries.py:145:41: FURB129 [*] Instead of calling `readlines()`, iterate over file object directly
- dev/breeze/src/airflow_breeze/global_constants.py:555:21: FURB129 Instead of calling `readlines()`, iterate over file object directly
+ dev/breeze/src/airflow_breeze/global_constants.py:555:21: FURB129 [*] Instead of calling `readlines()`, iterate over file object directly
- devel-common/src/sphinx_exts/redirects.py:44:21: FURB129 Instead of calling `readlines()`, iterate over file object directly
+ devel-common/src/sphinx_exts/redirects.py:44:21: FURB129 [*] Instead of calling `readlines()`, iterate over file object directly
- providers/google/tests/system/google/cloud/gcs/resources/transform_script.py:26:39: FURB129 Instead of calling `readlines()`, iterate over file object directly
+ providers/google/tests/system/google/cloud/gcs/resources/transform_script.py:26:39: FURB129 [*] Instead of calling `readlines()`, iterate over file object directly
- scripts/ci/pre_commit/newsfragments.py:36:43: FURB129 Instead of calling `readlines()`, iterate over file object directly
+ scripts/ci/pre_commit/newsfragments.py:36:43: FURB129 [*] Instead of calling `readlines()`, iterate over file object directly

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
FURB129 10 0 0 10 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@dylwil3
Copy link
Collaborator Author

dylwil3 commented Jun 6, 2025

Ecosystem check looks good to me!

Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Will you add these to the PR summary as you merge them? I'm also a bit paranoid about last time. What do you think about building up a Python code block and ruff invocation in the PR summary that makes sure that everything we stabilized makes it into the release? I'm picturing something like this for this case:

with open("file.txt") as fp:
    for line in fp.readlines():  # FURB129
        ...
ruff check example.py --no-cache \
    --select FURB129 # room for more \  --select ... later

@dylwil3
Copy link
Collaborator Author

dylwil3 commented Jun 6, 2025

Sounds good! We may need multiple code blocks in the end because for some stabilized behvaiors the file name matters (e.g. one of the behaviors cares whether the file is __init__.py).

@dylwil3 dylwil3 merged commit a07bad8 into brent/release-0.12.0 Jun 6, 2025
34 checks passed
@dylwil3 dylwil3 deleted the dylan/stabilize-readlines-fix-safe branch June 6, 2025 17:01
@dylwil3 dylwil3 mentioned this pull request Jun 6, 2025
2 tasks
ntBre added a commit that referenced this pull request Jun 8, 2025
…18496)

Note that the preview behavior was not documented (shame on us!) so the
documentation was not modified.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 8, 2025
…18496)

Note that the preview behavior was not documented (shame on us!) so the
documentation was not modified.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 9, 2025
…18496)

Note that the preview behavior was not documented (shame on us!) so the
documentation was not modified.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 10, 2025
…18496)

Note that the preview behavior was not documented (shame on us!) so the
documentation was not modified.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 11, 2025
…18496)

Note that the preview behavior was not documented (shame on us!) so the
documentation was not modified.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 17, 2025
…18496)

Note that the preview behavior was not documented (shame on us!) so the
documentation was not modified.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 17, 2025
…18496)

Note that the preview behavior was not documented (shame on us!) so the
documentation was not modified.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes Related to suggested fixes for violations rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants