-
Notifications
You must be signed in to change notification settings - Fork 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
[ruff 0.6] Improve the error message for PLW0642 #12866
Merged
Merged
Conversation
This file contains 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
MichaReiser
approved these changes
Aug 13, 2024
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PT023 | 661 | 196 | 465 | 0 | 0 |
PT001 | 295 | 159 | 136 | 0 | 0 |
PLW0642 | 104 | 52 | 52 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+52 -52 violations, +0 -0 fixes in 2 projects; 52 projects unchanged)
bokeh/bokeh (+1 -1 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- src/bokeh/events.py:182:9: PLW0642 Confusing assignment to `cls` argument in class method + src/bokeh/events.py:182:9: PLW0642 Reassigned `cls` variable in class method
pandas-dev/pandas (+51 -51 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
- pandas/core/arrays/categorical.py:572:13: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/categorical.py:572:13: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1065:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1065:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1080:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1080:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1081:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1081:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1109:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1109:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1118:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1118:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1129:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1129:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1131:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1131:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1136:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1136:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1185:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1185:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1187:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1187:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1203:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1203:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1260:13: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1260:13: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1274:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1274:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1480:13: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1480:13: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:1699:13: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:1699:13: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:2131:17: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:2131:17: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:2153:13: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:2153:13: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:456:17: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:456:17: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:778:13: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:778:13: PLW0642 Reassigned `self` variable in instance method - pandas/core/arrays/datetimelike.py:979:13: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/arrays/datetimelike.py:979:13: PLW0642 Reassigned `self` variable in instance method - pandas/core/frame.py:7827:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/frame.py:7827:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/frame.py:7840:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/frame.py:7840:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/frame.py:8183:9: PLW0642 Confusing assignment to `self` argument in instance method + pandas/core/frame.py:8183:9: PLW0642 Reassigned `self` variable in instance method - pandas/core/frame.py:8195:21: PLW0642 Confusing assignment to `self` argument in instance method ... 53 additional changes omitted for project
Changes by rule (1 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PLW0642 | 104 | 52 | 52 | 0 | 0 |
AlexWaygood
added a commit
that referenced
this pull request
Aug 14, 2024
MichaReiser
pushed a commit
that referenced
this pull request
Aug 14, 2024
MichaReiser
pushed a commit
that referenced
this pull request
Aug 14, 2024
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.
A followup to #12857, as suggested by @dhruvmanila in #12857 (comment)