-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workingpreviewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
read-whole-file (FURB101) is suppressed when open uses the newline parameter. Python 3.13 added newline to pathlib.Path.read_text, so in that version or later, FURB101 should still apply. Example:
$ cat >furb101.py <<'# EOF'
with open("furb101.py", encoding="utf-8", newline=None) as f:
contents = f.read()
# EOF
$ ruff --isolated check --select FURB101 --preview furb101.py --target-version py313
All checks passed!Version
ruff 0.15.5 (5e4a3d9 2026-03-05)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpreviewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint rule