Repository navigation
[pylint] Remove try body from branch counting - #11487
Merged
Merged
Conversation
Contributor
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| PLR0912 | 262 | 118 | 144 | 0 | 0 |
| RUF100 | 2 | 2 | 0 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+120 -144 violations, +0 -0 fixes in 4 projects; 46 projects unchanged)
PlasmaPy/PlasmaPy (+2 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ src/plasmapy/particles/_parsing.py:152:32: RUF100 [*] Unused `noqa` directive (unused: `PLR0912`) + src/plasmapy/utils/decorators/validators.py:289:30: RUF100 [*] Unused `noqa` directive (unused: `PLR0912`)
apache/airflow (+73 -87 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- airflow/api/common/airflow_health.py:29:5: PLR0912 Too many branches (14 > 12) - airflow/api_connexion/endpoints/log_endpoint.py:45:5: PLR0912 Too many branches (13 > 12) + airflow/api_connexion/endpoints/task_instance_endpoint.py:158:5: PLR0912 Too many branches (15 > 12) - airflow/api_connexion/endpoints/task_instance_endpoint.py:158:5: PLR0912 Too many branches (16 > 12) + airflow/cli/commands/connection_command.py:209:5: PLR0912 Too many branches (18 > 12) - airflow/cli/commands/connection_command.py:209:5: PLR0912 Too many branches (19 > 12) + airflow/cli/commands/db_command.py:98:5: PLR0912 Too many branches (15 > 12) - airflow/cli/commands/db_command.py:98:5: PLR0912 Too many branches (17 > 12) + airflow/cli/commands/task_command.py:403:5: PLR0912 Too many branches (14 > 12) - airflow/cli/commands/task_command.py:403:5: PLR0912 Too many branches (16 > 12) + airflow/cli/commands/task_command.py:630:5: PLR0912 Too many branches (17 > 12) - airflow/cli/commands/task_command.py:630:5: PLR0912 Too many branches (18 > 12) + airflow/configuration.py:1343:9: PLR0912 Too many branches (13 > 12) - airflow/configuration.py:1343:9: PLR0912 Too many branches (15 > 12) - airflow/dag_processing/manager.py:1122:9: PLR0912 Too many branches (13 > 12) + airflow/dag_processing/manager.py:543:9: PLR0912 Too many branches (24 > 12) - airflow/dag_processing/manager.py:543:9: PLR0912 Too many branches (25 > 12) + airflow/dag_processing/processor.py:421:9: PLR0912 Too many branches (27 > 12) - airflow/dag_processing/processor.py:421:9: PLR0912 Too many branches (30 > 12) - airflow/datasets/__init__.py:52:5: PLR0912 Too many branches (13 > 12) + airflow/jobs/backfill_job_runner.py:465:9: PLR0912 Too many branches (23 > 12) - airflow/jobs/backfill_job_runner.py:465:9: PLR0912 Too many branches (25 > 12) + airflow/jobs/backfill_job_runner.py:497:17: PLR0912 Too many branches (25 > 12) - airflow/jobs/backfill_job_runner.py:497:17: PLR0912 Too many branches (26 > 12) + airflow/jobs/backfill_job_runner.py:899:9: PLR0912 Too many branches (16 > 12) - airflow/jobs/backfill_job_runner.py:899:9: PLR0912 Too many branches (17 > 12) + airflow/jobs/scheduler_job_runner.py:298:9: PLR0912 Too many branches (29 > 12) - airflow/jobs/scheduler_job_runner.py:298:9: PLR0912 Too many branches (30 > 12) + airflow/jobs/scheduler_job_runner.py:804:9: PLR0912 Too many branches (13 > 12) - airflow/jobs/scheduler_job_runner.py:804:9: PLR0912 Too many branches (16 > 12) ... 130 additional changes omitted for project
bokeh/bokeh (+5 -7 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- src/bokeh/core/has_props.py:615:9: PLR0912 Too many branches (13 > 12) + src/bokeh/core/property/bases.py:342:9: PLR0912 Too many branches (16 > 12) - src/bokeh/core/property/bases.py:342:9: PLR0912 Too many branches (17 > 12) + src/bokeh/core/query.py:110:5: PLR0912 Too many branches (24 > 12) - src/bokeh/core/query.py:110:5: PLR0912 Too many branches (25 > 12) + src/bokeh/embed/bundle.py:259:5: PLR0912 Too many branches (16 > 12) - src/bokeh/embed/bundle.py:259:5: PLR0912 Too many branches (17 > 12) + src/bokeh/plotting/_graph.py:54:5: PLR0912 Too many branches (17 > 12) - src/bokeh/plotting/_graph.py:54:5: PLR0912 Too many branches (19 > 12) + src/bokeh/server/server.py:351:9: PLR0912 Too many branches (13 > 12) ... 2 additional changes omitted for project
zulip/zulip (+40 -50 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
+ corporate/lib/stripe.py:5376:5: PLR0912 Too many branches (14 > 12) - corporate/lib/stripe.py:5376:5: PLR0912 Too many branches (16 > 12) + corporate/lib/support.py:227:5: PLR0912 Too many branches (13 > 12) - corporate/lib/support.py:227:5: PLR0912 Too many branches (14 > 12) - corporate/views/installation_activity.py:92:5: PLR0912 Too many branches (13 > 12) + corporate/views/remote_billing_page.py:159:5: PLR0912 Too many branches (18 > 12) - corporate/views/remote_billing_page.py:159:5: PLR0912 Too many branches (21 > 12) + corporate/views/support.py:335:5: PLR0912 Too many branches (31 > 12) - corporate/views/support.py:335:5: PLR0912 Too many branches (34 > 12) + corporate/views/support.py:629:5: PLR0912 Too many branches (32 > 12) - corporate/views/support.py:629:5: PLR0912 Too many branches (37 > 12) - corporate/views/webhook.py:22:5: PLR0912 Too many branches (16 > 12) + tools/lib/provision.py:342:5: PLR0912 Too many branches (14 > 12) - tools/lib/provision.py:342:5: PLR0912 Too many branches (18 > 12) + tools/lib/provision_inner.py:216:5: PLR0912 Too many branches (24 > 12) - tools/lib/provision_inner.py:216:5: PLR0912 Too many branches (25 > 12) + tools/lib/template_parser.py:54:5: PLR0912 Too many branches (36 > 12) ... 73 additional changes omitted for project
Changes by rule (2 rules affected)
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| PLR0912 | 262 | 118 | 144 | 0 | 0 |
| RUF100 | 2 | 2 | 0 | 0 | 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Matching Pylint, we now omit the
trybody itself from branch counting. Eachexceptcounts as a branch, as does theelseand thefinally.Closes #11205.