-
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
Drop __get__
and __set__
from unnecessary-dunder-call
#9791
Conversation
These are for descriptors which affects the behavior of the object _as a property_; I do not think they should be called directly but there is no alternative when working with the object directly
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.
Agreed
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PLC2801 | 7 | 0 | 7 | 0 | 0 |
Unclear if we should drop the violation entirely. I think we should though — will require a bit more work and some test coverage. |
Yeah I say we drop it. |
The suggestion for |
Ah good catch yeah that one is for descriptors too... |
308d0ab
to
05c2c73
Compare
crates/ruff_linter/resources/test/fixtures/pylint/unnecessary_dunder_call.py
Outdated
Show resolved
Hide resolved
…dunder_call.py Co-authored-by: Zanie Blue <contact@zanie.dev>
Can't approve but lgtm, thanks! |
These are for descriptors which affects the behavior of the object as a property; I do not think they should be called directly but there is no alternative when working with the object directly.
Closes #9789