Skip to content

Conversation

@Lokejoke
Copy link
Owner

@Lokejoke Lokejoke commented Nov 16, 2024

Summary

This PR implements in-compare-with-single-item-container rule.
Use of in or not in operator on single item container is unnecessary;

Test Plan

cargo test

@github-actions
Copy link

github-actions bot commented Nov 16, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+25 -0 violations, +0 -0 fixes in 3 projects; 51 projects unchanged)

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

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ airflow/utils/db.py:1404:24: WPS525 Avoid comparing to a single item container with membership operator
+ airflow/www/extensions/init_views.py:142:79: WPS525 Avoid comparing to a single item container with membership operator
+ dev/breeze/src/airflow_breeze/utils/run_tests.py:346:26: WPS525 Avoid comparing to a single item container with membership operator
+ hatch_build.py:583:67: WPS525 Avoid comparing to a single item container with membership operator
+ providers/src/airflow/providers/google/cloud/triggers/cloud_build.py:89:55: WPS525 Avoid comparing to a single item container with membership operator
+ providers/src/airflow/providers/snowflake/triggers/snowflake_trigger.py:80:58: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:147:108: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:171:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:193:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:194:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:216:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:217:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:274:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:275:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:285:36: WPS525 Avoid comparing to a single item container with membership operator
+ providers/tests/common/sql/sensors/test_sql.py:286:36: WPS525 Avoid comparing to a single item container with membership operator
+ tests/jobs/test_scheduler_job.py:3659:41: WPS525 Avoid comparing to a single item container with membership operator

apache/superset (+2 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ superset/connectors/sqla/models.py:859:71: WPS525 Avoid comparing to a single item container with membership operator
+ superset/models/helpers.py:1888:32: WPS525 Avoid comparing to a single item container with membership operator

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

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ zerver/actions/presence.py:85:23: WPS525 Avoid comparing to a single item container with membership operator
+ zerver/lib/emoji.py:107:30: WPS525 Avoid comparing to a single item container with membership operator
+ zerver/lib/narrow_predicate.py:60:50: WPS525 Avoid comparing to a single item container with membership operator
+ zerver/tests/test_realm.py:2120:24: WPS525 Avoid comparing to a single item container with membership operator
+ zerver/tests/test_settings.py:234:26: WPS525 Avoid comparing to a single item container with membership operator
+ zerver/tests/test_subs.py:2690:38: WPS525 Avoid comparing to a single item container with membership operator

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
WPS525 25 25 0 0 0

@Lokejoke Lokejoke added the duplicate This issue or pull request already exists label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants