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] Better diagnostic range (PLR1702) #15578

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

InSyncWithFoo
Copy link
Contributor

Summary

Resolves #15570.

Test Plan

cargo nextest run and cargo insta test.

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+52 -118 violations, +0 -0 fixes in 11 projects; 44 projects unchanged)

aiven/aiven-client (+0 -1 violations, +0 -0 fixes)

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

- aiven/client/cli.py:860:9: PLR1702 Too many nested blocks (6 > 5)

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

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

- src/plasmapy/analysis/nullpoint.py:1446:5: PLR1702 Too many nested blocks (6 > 5)

apache/airflow (+15 -31 violations, +0 -0 fixes)

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

- airflow/models/connection.py:421:9: PLR1702 Too many nested blocks (6 > 5)
+ airflow/models/connection.py:427:1: PLR1702 Too many nested blocks (6 > 5)
- dev/breeze/src/airflow_breeze/commands/release_management_commands.py:2196:5: PLR1702 Too many nested blocks (6 > 5)
- dev/breeze/src/airflow_breeze/commands/release_management_commands.py:2196:5: PLR1702 Too many nested blocks (7 > 5)
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:2249:1: PLR1702 Too many nested blocks (6 > 5)
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:2261:1: PLR1702 Too many nested blocks (7 > 5)
- dev/breeze/src/airflow_breeze/commands/release_management_commands.py:3485:5: PLR1702 Too many nested blocks (6 > 5)
- dev/breeze/src/airflow_breeze/utils/packages.py:571:5: PLR1702 Too many nested blocks (6 > 5)
+ dev/breeze/src/airflow_breeze/utils/packages.py:581:1: PLR1702 Too many nested blocks (6 > 5)
- dev/breeze/src/airflow_breeze/utils/reproducible.py:119:5: PLR1702 Too many nested blocks (6 > 5)
- dev/breeze/src/airflow_breeze/utils/reproducible.py:119:5: PLR1702 Too many nested blocks (6 > 5)
- dev/breeze/src/airflow_breeze/utils/reproducible.py:119:5: PLR1702 Too many nested blocks (6 > 5)
- providers/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:216:9: PLR1702 Too many nested blocks (6 > 5)
... 33 additional changes omitted for project

apache/superset (+11 -26 violations, +0 -0 fixes)

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

+ superset/migrations/shared/native_filters.py:208:1: PLR1702 Too many nested blocks (7 > 5)
- superset/migrations/shared/native_filters.py:246:5: PLR1702 Too many nested blocks (7 > 5)
+ superset/migrations/shared/native_filters.py:261:1: PLR1702 Too many nested blocks (7 > 5)
- superset/migrations/shared/native_filters.py:287:5: PLR1702 Too many nested blocks (7 > 5)
+ superset/migrations/shared/native_filters.py:343:1: PLR1702 Too many nested blocks (7 > 5)
- superset/migrations/shared/native_filters.py:79:5: PLR1702 Too many nested blocks (6 > 5)
- superset/migrations/shared/native_filters.py:79:5: PLR1702 Too many nested blocks (6 > 5)
- superset/migrations/shared/native_filters.py:79:5: PLR1702 Too many nested blocks (6 > 5)
- superset/migrations/shared/native_filters.py:79:5: PLR1702 Too many nested blocks (7 > 5)
- superset/migrations/shared/native_filters.py:79:5: PLR1702 Too many nested blocks (7 > 5)
... 27 additional changes omitted for project

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

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

- samcli/commands/sync/command.py:331:5: PLR1702 Too many nested blocks (7 > 5)
- samcli/lib/package/utils.py:267:5: PLR1702 Too many nested blocks (7 > 5)
- samcli/lib/utils/subprocess_utils.py:88:5: PLR1702 Too many nested blocks (6 > 5)
- samcli/lib/utils/subprocess_utils.py:88:5: PLR1702 Too many nested blocks (6 > 5)

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

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

- src/bokeh/core/query.py:178:5: PLR1702 Too many nested blocks (6 > 5)
- src/bokeh/core/query.py:178:5: PLR1702 Too many nested blocks (6 > 5)
+ src/bokeh/core/query.py:197:1: PLR1702 Too many nested blocks (6 > 5)
- tests/unit/bokeh/command/subcommands/test_serve.py:508:5: PLR1702 Too many nested blocks (6 > 5)

freedomofpress/securedrop (+0 -2 violations, +0 -0 fixes)

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

- admin/bootstrap.py:79:5: PLR1702 Too many nested blocks (6 > 5)
- securedrop/pretty_bad_protocol/_parsers.py:291:9: PLR1702 Too many nested blocks (6 > 5)

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

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

- ibis/expr/visualize.py:116:5: PLR1702 Too many nested blocks (6 > 5)
- ibis/expr/visualize.py:116:5: PLR1702 Too many nested blocks (7 > 5)
+ ibis/expr/visualize.py:140:1: PLR1702 Too many nested blocks (6 > 5)
+ ibis/expr/visualize.py:146:1: PLR1702 Too many nested blocks (7 > 5)

zulip/zulip (+7 -15 violations, +0 -0 fixes)

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

- scripts/setup/generate_secrets.py:127:5: PLR1702 Too many nested blocks (6 > 5)
+ scripts/setup/generate_secrets.py:162:1: PLR1702 Too many nested blocks (6 > 5)
+ zerver/lib/events.py:1125:1: PLR1702 Too many nested blocks (7 > 5)
+ zerver/lib/events.py:1140:1: PLR1702 Too many nested blocks (6 > 5)
+ zerver/lib/events.py:1148:1: PLR1702 Too many nested blocks (7 > 5)
+ zerver/lib/events.py:1461:1: PLR1702 Too many nested blocks (6 > 5)
+ zerver/lib/events.py:1475:1: PLR1702 Too many nested blocks (6 > 5)
- zerver/lib/events.py:856:5: PLR1702 Too many nested blocks (6 > 5)
- zerver/lib/events.py:856:5: PLR1702 Too many nested blocks (6 > 5)
- zerver/lib/events.py:856:5: PLR1702 Too many nested blocks (6 > 5)
... 12 additional changes omitted for project

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

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

- src/_pytest/_py/path.py:1201:9: PLR1702 Too many nested blocks (7 > 5)
+ src/_pytest/_py/path.py:1232:1: PLR1702 Too many nested blocks (7 > 5)
- src/_pytest/assertion/rewrite.py:753:9: PLR1702 Too many nested blocks (6 > 5)
- src/_pytest/fixtures.py:252:5: PLR1702 Too many nested blocks (6 > 5)

astropy/astropy (+15 -30 violations, +0 -0 fixes)

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

- astropy/coordinates/baseframe.py:767:9: PLR1702 Too many nested blocks (6 > 5)
- astropy/coordinates/baseframe.py:767:9: PLR1702 Too many nested blocks (6 > 5)
+ astropy/coordinates/baseframe.py:782:1: PLR1702 Too many nested blocks (6 > 5)
+ astropy/coordinates/baseframe.py:788:1: PLR1702 Too many nested blocks (6 > 5)
- astropy/coordinates/transformations/graph.py:316:9: PLR1702 Too many nested blocks (6 > 5)
+ astropy/coordinates/transformations/graph.py:336:1: PLR1702 Too many nested blocks (6 > 5)
+ astropy/io/ascii/cds.py:111:1: PLR1702 Too many nested blocks (6 > 5)
- astropy/io/ascii/cds.py:84:9: PLR1702 Too many nested blocks (6 > 5)
- astropy/io/ascii/html.py:381:9: PLR1702 Too many nested blocks (7 > 5)
- astropy/io/ascii/html.py:381:9: PLR1702 Too many nested blocks (7 > 5)
- astropy/io/ascii/html.py:381:9: PLR1702 Too many nested blocks (7 > 5)
+ astropy/io/ascii/html.py:426:1: PLR1702 Too many nested blocks (7 > 5)
- astropy/io/ascii/mrt.py:466:9: PLR1702 Too many nested blocks (6 > 5)
... 32 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLR1702 170 52 118 0 0

@InSyncWithFoo InSyncWithFoo marked this pull request as draft January 19, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PLR1702 spam
1 participant