Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refurb] Do not allow any keyword arguments for read-whole-file in rb mode (FURB101) #10803

Merged

Conversation

augustelalande
Copy link
Contributor

Summary

Path.read_bytes() does not support any keyword arguments, so FURB101 should not be triggered if the file is opened in rb mode with any keyword arguments.

Test Plan

Move erroneous test to "Non-error" section of fixture.

@augustelalande augustelalande changed the title [refurb] Do not allow any keyword arguments for read-whole-file in rb mode [refurb] Do not allow any keyword arguments for read-whole-file in rb mode (FURB101) Apr 6, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Apr 6, 2024
@charliermarsh charliermarsh merged commit 7fb012d into astral-sh:main Apr 6, 2024
17 checks passed
Copy link
Contributor

github-actions bot commented Apr 6, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Glyphack pushed a commit to Glyphack/ruff that referenced this pull request Apr 12, 2024
…n `rb` mode (`FURB101`) (astral-sh#10803)

## Summary

`Path.read_bytes()` does not support any keyword arguments, so `FURB101`
should not be triggered if the file is opened in `rb` mode with any
keyword arguments.

## Test Plan

Move erroneous test to "Non-error" section of fixture.
@augustelalande augustelalande deleted the read-whole-file-minor-bug branch April 22, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants