-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[pylint
] Detect pathlib.Path.open
calls in unspecified-encoding
(PLW1514
)
#11288
Conversation
I was not able to detect violations of the form
I don't know if this is currently doable. |
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PLW1514 | 76 | 76 | 0 | 0 | 0 |
crates/ruff_linter/src/rules/pylint/rules/unspecified_encoding.rs
Outdated
Show resolved
Hide resolved
@dhruvmanila Done as requested.
Any comment on this |
I think it's fine to not detect this now as this would fall under the bucket of type-inference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this!
I've added some additional test cases and actually used QualifiedName
for the Regular
variant. This is to re-use the Display
implementation on QualifiedName
.
The ecosystem changes looks correct. |
After a good amount of discussion, I've decided to name it Feel free to disagree with any of the changes made by me. |
Summary
Resolves #11263
Detect
pathlib.Path.open
calls which do not specify a file encoding.Test Plan
Test cases added to fixture.