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] Add fix for collapsible-else-if (PLR5501) #9594

Merged
merged 7 commits into from
Jan 22, 2024

Conversation

diceroll123
Copy link
Contributor

Summary

adds a fix for collapsible-else-if / PLR5501

Test Plan

cargo test

@diceroll123 diceroll123 changed the title [pylint] - add fix for collapsible-else-if / PLR5501 [pylint] - add fix for collapsible-else-if / PLR5501 Jan 20, 2024
Copy link
Contributor

github-actions bot commented Jan 20, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +142 -0 fixes in 4 projects; 39 projects unchanged)

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

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

- airflow/configuration.py:628:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/configuration.py:628:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/jobs/backfill_job_runner.py:521:17: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/jobs/backfill_job_runner.py:521:17: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/models/dag.py:1850:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/models/dag.py:1850:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/models/dag.py:2495:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/models/dag.py:2495:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/models/dagrun.py:486:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/models/dagrun.py:486:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/models/variable.py:144:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/models/variable.py:144:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/operators/bash.py:201:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/operators/bash.py:201:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/alibaba/cloud/sensors/oss_key.py:83:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/alibaba/cloud/sensors/oss_key.py:83:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/amazon/aws/hooks/sagemaker.py:1154:17: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/amazon/aws/hooks/sagemaker.py:1154:17: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/amazon/aws/operators/batch.py:381:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/amazon/aws/operators/batch.py:381:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/amazon/aws/operators/eks.py:1050:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/amazon/aws/operators/eks.py:1050:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/amazon/aws/sensors/s3.py:153:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/amazon/aws/sensors/s3.py:153:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/amazon/aws/sensors/s3.py:349:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/amazon/aws/sensors/s3.py:349:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/amazon/aws/transfers/ftp_to_s3.py:143:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/amazon/aws/transfers/ftp_to_s3.py:143:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/cncf/kubernetes/utils/pod_manager.py:533:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/cncf/kubernetes/utils/pod_manager.py:533:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/elasticsearch/log/es_task_handler.py:449:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/elasticsearch/log/es_task_handler.py:449:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/providers/google/cloud/operators/datacatalog.py:385:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/providers/google/cloud/operators/datacatalog.py:385:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
... 64 additional changes omitted for project

aws/aws-sam-cli (+0 -0 violations, +2 -0 fixes)

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

- tests/integration/logs/test_logs_command.py:218:17: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ tests/integration/logs/test_logs_command.py:218:17: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation

bokeh/bokeh (+0 -0 violations, +16 -0 fixes)

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

- src/bokeh/client/session.py:454:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/client/session.py:454:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- src/bokeh/core/query.py:210:17: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/core/query.py:210:17: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- src/bokeh/core/serialization.py:718:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/core/serialization.py:718:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- src/bokeh/embed/util.py:146:5: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/embed/util.py:146:5: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- src/bokeh/server/tornado.py:315:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/server/tornado.py:315:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
... 6 additional changes omitted for project

zulip/zulip (+0 -0 violations, +26 -0 fixes)

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

- analytics/views/stats.py:280:5: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ analytics/views/stats.py:280:5: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- corporate/lib/stripe.py:4553:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ corporate/lib/stripe.py:4553:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- scripts/lib/zulip_tools.py:202:5: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ scripts/lib/zulip_tools.py:202:5: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- tools/lib/template_parser.py:512:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ tools/lib/template_parser.py:512:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- zerver/actions/message_edit.py:1070:13: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ zerver/actions/message_edit.py:1070:13: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
... 16 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLR5501 142 0 0 142 0

@diceroll123 diceroll123 changed the title [pylint] - add fix for collapsible-else-if / PLR5501 [pylint] - add fix for collapsible-else-if (PLR5501) Jan 21, 2024
@diceroll123 diceroll123 changed the title [pylint] - add fix for collapsible-else-if (PLR5501) [pylint] - Add fix for collapsible-else-if (PLR5501) Jan 21, 2024
@charliermarsh charliermarsh added fixes Related to suggested fixes for violations preview Related to preview mode features labels Jan 22, 2024
@charliermarsh charliermarsh changed the title [pylint] - Add fix for collapsible-else-if (PLR5501) [pylint] Add fix for collapsible-else-if (PLR5501) Jan 22, 2024
@charliermarsh charliermarsh merged commit e54ed28 into astral-sh:main Jan 22, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations preview Related to preview mode features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants