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

[pylint] Extend self-assigning-variable to multi-target assignments #8839

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

charliermarsh
Copy link
Member

Closes #8667.

@charliermarsh charliermarsh added the bug Something isn't working label Nov 25, 2023
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+5 -0 violations, +0 -0 fixes in 41 projects)

apache/airflow (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --no-preview --select ALL

+ tests/providers/common/sql/operators/test_sql.py:237:9: PLW0127 Self-assignment of variable `operator`

ibis-project/ibis (+1 -0 violations, +0 -0 fixes)

+ ibis/backends/pandas/tests/test_client.py:31:5: PLW0127 Self-assignment of variable `test_data`

pandas-dev/pandas (+3 -0 violations, +0 -0 fixes)

+ pandas/plotting/_matplotlib/tools.py:104:29: PLW0127 Self-assignment of variable `ncols`
+ pandas/plotting/_matplotlib/tools.py:106:22: PLW0127 Self-assignment of variable `nrows`
+ pandas/tests/indexes/multi/test_join.py:264:5: PLW0127 Self-assignment of variable `midx`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLW0127 5 5 0 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+5 -0 violations, +0 -0 fixes in 41 projects)

apache/airflow (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

+ tests/providers/common/sql/operators/test_sql.py:237:9: PLW0127 Self-assignment of variable `operator`

ibis-project/ibis (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ ibis/backends/pandas/tests/test_client.py:31:5: PLW0127 Self-assignment of variable `test_data`

pandas-dev/pandas (+3 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ pandas/plotting/_matplotlib/tools.py:104:29: PLW0127 Self-assignment of variable `ncols`
+ pandas/plotting/_matplotlib/tools.py:106:22: PLW0127 Self-assignment of variable `nrows`
+ pandas/tests/indexes/multi/test_join.py:264:5: PLW0127 Self-assignment of variable `midx`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLW0127 5 5 0 0 0

@charliermarsh charliermarsh merged commit 9b17724 into main Nov 25, 2023
17 checks passed
@charliermarsh charliermarsh deleted the charlie/self-assign branch November 25, 2023 18:42
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.

self-assigning-variable (PLW0127) false negative on multi assignment
1 participant