[refurb] Stabilize fix safety for readlines-in-for (FURB129)#18496
Conversation
| // https://github.com/astral-sh/ruff/pull/18208 | ||
| pub(crate) const fn is_multiple_with_statements_fix_safe_enabled( | ||
| settings: &LinterSettings, | ||
| ) -> bool { |
There was a problem hiding this comment.
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
5f1af44 to
11966be
Compare
78e13e3 to
2e4e0f7
Compare
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| FURB129 | 10 | 0 | 0 | 10 | 0 |
Linter (preview)
✅ ecosystem check detected no linter changes.
|
Ecosystem check looks good to me! |
ntBre
left a comment
There was a problem hiding this comment.
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|
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 |
…18496) Note that the preview behavior was not documented (shame on us!) so the documentation was not modified. --------- Co-authored-by: Brent Westbrook <[email protected]>
…18496) Note that the preview behavior was not documented (shame on us!) so the documentation was not modified. --------- Co-authored-by: Brent Westbrook <[email protected]>
…18496) Note that the preview behavior was not documented (shame on us!) so the documentation was not modified. --------- Co-authored-by: Brent Westbrook <[email protected]>
…18496) Note that the preview behavior was not documented (shame on us!) so the documentation was not modified. --------- Co-authored-by: Brent Westbrook <[email protected]>
…18496) Note that the preview behavior was not documented (shame on us!) so the documentation was not modified. --------- Co-authored-by: Brent Westbrook <[email protected]>
…18496) Note that the preview behavior was not documented (shame on us!) so the documentation was not modified. --------- Co-authored-by: Brent Westbrook <[email protected]>
…18496) Note that the preview behavior was not documented (shame on us!) so the documentation was not modified. --------- Co-authored-by: Brent Westbrook <[email protected]>
Note that the preview behavior was not documented (shame on us!) so the documentation was not modified.