Drop __get__ and __set__ from unnecessary-dunder-call#9791
Merged
charliermarsh merged 4 commits intomainfrom Feb 5, 2024
Merged
Drop __get__ and __set__ from unnecessary-dunder-call#9791charliermarsh merged 4 commits intomainfrom
__get__ and __set__ from unnecessary-dunder-call#9791charliermarsh merged 4 commits intomainfrom
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
Contributor
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| PLC2801 | 7 | 0 | 7 | 0 | 0 |
Member
Author
|
Unclear if we should drop the violation entirely. I think we should though — will require a bit more work and some test coverage. |
Member
|
Yeah I say we drop it. |
Member
|
The suggestion for |
Member
Author
|
Ah good catch yeah that one is for descriptors too... |
308d0ab to
05c2c73
Compare
zanieb
commented
Feb 5, 2024
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>
Member
Author
|
Can't approve but lgtm, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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