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

Extend unnecessary-pass (PIE790) to include ellipses in preview #8641

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

charliermarsh
Copy link
Member

Summary

This PR extends unnecessary-pass (PIE790) to flag unnecessary ellipsis expressions in addition to pass statements. A pass is equivalent to a standalone ..., so it feels correct to me that a single rule should cover both cases.

When we look to v0.2.0, we should also consider deprecating PYI013, which flags ellipses only for classes.

Closes #8602.

@charliermarsh charliermarsh added rule Implementing or modifying a lint rule preview Related to preview mode features labels Nov 13, 2023
Copy link
Contributor

github-actions bot commented Nov 13, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

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

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

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

+ airflow/hooks/base.py:168:9: PIE790 [*] Unnecessary `...` literal
+ airflow/hooks/base.py:188:9: PIE790 [*] Unnecessary `...` literal
+ airflow/jobs/scheduler_job_runner.py:1586:13: PIE790 [*] Unnecessary `...` literal
+ airflow/metrics/protocols.py:40:9: PIE790 [*] Unnecessary `...` literal
+ airflow/metrics/protocols.py:44:9: PIE790 [*] Unnecessary `...` literal
+ airflow/metrics/validators.py:44:5: PIE790 [*] Unnecessary `...` literal
+ airflow/notifications/basenotifier.py:81:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/batch_client.py:125:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/batch_client.py:137:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/batch_client.py:68:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/batch_client.py:94:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/ecs.py:159:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/ecs.py:166:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/ecs.py:173:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/ecs.py:180:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/ecs.py:187:9: PIE790 [*] Unnecessary `...` literal
+ airflow/providers/amazon/aws/hooks/ecs.py:194:9: PIE790 [*] Unnecessary `...` literal
+ airflow/serialization/json_schema.py:43:9: PIE790 [*] Unnecessary `...` literal
+ airflow/serialization/json_schema.py:47:9: PIE790 [*] Unnecessary `...` literal
+ airflow/serialization/json_schema.py:51:9: PIE790 [*] Unnecessary `...` literal
+ airflow/www/security.py:43:5: PIE790 [*] Unnecessary `...` literal
+ docs/exts/substitution_extensions.py:120:9: PIE790 [*] Unnecessary `...` literal

demisto/content (+1 -0 violations, +0 -0 fixes)

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

+ Packs/TrendMicroEmailSecurity/Integrations/TrendMicroEmailSecurityEventCollector/TrendMicroEmailSecurityEventCollector.py:70:5: PIE790 [*] Unnecessary `...` literal

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

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

+ ibis/common/patterns.py:208:9: PIE790 [*] Unnecessary `...` literal

scikit-build/scikit-build-core (+5 -0 violations, +0 -0 fixes)

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

+ src/scikit_build_core/settings/sources.py:154:9: PIE790 [*] Unnecessary `...` literal
+ src/scikit_build_core/settings/sources.py:161:9: PIE790 [*] Unnecessary `...` literal
+ src/scikit_build_core/settings/sources.py:169:9: PIE790 [*] Unnecessary `...` literal
+ src/scikit_build_core/settings/sources.py:177:9: PIE790 [*] Unnecessary `...` literal
+ src/scikit_build_core/settings/sources.py:184:9: PIE790 [*] Unnecessary `...` literal

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PIE790 29 29 0 0 0

@charliermarsh charliermarsh enabled auto-merge (squash) November 13, 2023 19:20
@charliermarsh charliermarsh merged commit 534fc34 into main Nov 13, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/pie branch November 13, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend PIE790 to ellipses
2 participants