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] Implementing len-as-condition (PLC1802) #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Lokejoke
Copy link
Owner

@Lokejoke Lokejoke commented Nov 16, 2024

Copy link

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+16 -0 violations, +0 -0 fixes in 5 projects; 49 projects unchanged)

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

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

+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:1624:8: PLC1802 [*] `len(success_entries)` used as condition without comparison
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:1631:8: PLC1802 [*] `len(skipped_entries)` used as condition without comparison
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:1736:12: PLC1802 [*] `len(success_entries)` used as condition without comparison
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:1743:12: PLC1802 [*] `len(skipped_entries)` used as condition without comparison
+ providers/src/airflow/providers/amazon/aws/hooks/glue.py:264:16: PLC1802 [*] `len(fetched_logs)` used as condition without comparison
+ providers/src/airflow/providers/sftp/sensors/sftp.py:128:16: PLC1802 [*] `len(files_found)` used as condition without comparison
+ providers/src/airflow/providers/snowflake/operators/snowflake.py:559:20: PLC1802 [*] `len(queries_in_progress)` used as condition without comparison

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

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

+ superset/databases/filters.py:98:16: PLC1802 [*] `len(allowed_schemas)` used as condition without comparison
+ superset/migrations/versions/2018-07-22_11-59_bebcf3fed1fe_convert_dashboard_v1_positions.py:444:61: PLC1802 [*] `len(SEQUENCE)` used as condition without comparison
+ superset/migrations/versions/2018-07-22_11-59_bebcf3fed1fe_convert_dashboard_v1_positions.py:546:11: PLC1802 [*] `len(ordered_raw_positions)` used as condition without comparison
+ superset/migrations/versions/2018-07-22_11-59_bebcf3fed1fe_convert_dashboard_v1_positions.py:559:16: PLC1802 [*] `len(available_columns_index)` used as condition without comparison
+ superset/migrations/versions/2018-11-12_13-31_4ce8df208545_migrate_time_range_for_default_filters.py:68:24: PLC1802 [*] `len(keys)` used as condition without comparison

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

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

+ src/bokeh/core/validation/check.py:216:27: PLC1802 [*] `len(warnings)` used as condition without comparison

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

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

+ zerver/views/invite.py:127:8: PLC1802 [*] `len(streams)` used as condition without comparison
+ zerver/views/invite.py:243:8: PLC1802 [*] `len(streams)` used as condition without comparison

pytest-dev/pytest (+1 -0 violations, +0 -0 fixes)

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

+ testing/_py/test_local.py:218:16: PLC1802 [*] `len(lst)` used as condition without comparison

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLC1802 16 16 0 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants