Skip to content

Fix panic on access to definitions after analyzing definitions#23588

Merged
ntBre merged 4 commits intomainfrom
brent/fix-definition-panic
Feb 26, 2026
Merged

Fix panic on access to definitions after analyzing definitions#23588
ntBre merged 4 commits intomainfrom
brent/fix-definition-panic

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Feb 26, 2026

Summary

This PR fixes #23587 by removing this std::mem::take call:

let definitions = std::mem::take(&mut checker.semantic.definitions);

This was previously moving the Definitions out of the Checker and causing
this operation to panic if the definitions were accessed in a later analysis
phase:

let definitions = std::mem::take(&mut checker.semantic.definitions);

which was apparently never done before PLR1712 was added.

I don't see any reason why this really needed to be a move as it only took a
couple of lifetimes to handle it with borrowing, so this seems like the easiest
fix.

I also changed the indexing operation to a get call (with a debug_assert)
since the method already returns an Option, but doing that alone would prevent
PLR1712 from firing in the module scope.

Test Plan

A new test based on the issue that also covers the module scope mentioned above

Summary
--

This PR fixes #23587 by removing this `std::mem::take` call:

https://github.com/astral-sh/ruff/blob/a62ba8c6e2bac0b899d90fd30a1b26c07aac44bb/crates/ruff_linter/src/checkers/ast/analyze/definitions.rs#L120

This was previously moving the `Definitions` out of the `Checker` and causing
this operation to panic if the definitions were accessed in a later analysis
phase:

https://github.com/astral-sh/ruff/blob/a62ba8c6e2bac0b899d90fd30a1b26c07aac44bb/crates/ruff_linter/src/checkers/ast/analyze/definitions.rs#L120

which was apparently never done before `PLR1712` was added.

I don't see any reason why this really needed to be a move as it only took a
couple of lifetimes to handle it with borrowing, so this seems like the easiest
fix.

I also changed the indexing operation to a `get` call (with a `debug_assert`)
since the method already returns an `Option`, but doing that alone would prevent
`PLR1712` from firing in the module scope.

Test Plan
--

A new test based on the issue that also covers the module scope mentioned above
@ntBre ntBre added the bug Something isn't working label Feb 26, 2026
@ntBre ntBre marked this pull request as ready for review February 26, 2026 17:28
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 26, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+10991 -371 violations, +0 -0 fixes in 20 projects; 36 projects unchanged)

PlasmaPy/PlasmaPy (+31 -15 violations, +0 -0 fixes)

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

- docs/conf.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/PlasmaPy:PlasmaPy/docs/conf.py`: `index out of bounds: the len is 0 but the index is 0`
+ docs/conf.py:39:8: PLC2701 Private name import `_author_list_from_cff`
+ docs/conf.py:40:8: PLC2701 Private name import `_changelog_index`
+ docs/conf.py:41:8: PLC2701 Private name import `_global_substitutions`
+ docs/conf.py:59:5: LOG015 `info()` call on root logger
+ docs/conf.py:63:5: LOG015 `warning()` call on root logger
- docs/notebooks/formulary/braginskii.ipynb: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/PlasmaPy:PlasmaPy/docs/notebooks/formulary/braginskii.ipynb`: `index out of bounds: the len is 0 but the index is 0`
- src/plasmapy/analysis/swept_langmuir/floating_potential.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/PlasmaPy:PlasmaPy/src/plasmapy/analysis/swept_langmuir/floating_potential.py`: `index out of bounds: the len is 0 but the index is 0`
+ src/plasmapy/analysis/swept_langmuir/floating_potential.py:268:33: FURB140 [*] Use `itertools.starmap` instead of the generator
+ src/plasmapy/analysis/swept_langmuir/floating_potential.py:3:11: RUF022 [*] `__all__` is not sorted
... 36 additional changes omitted for project

apache/airflow (+6279 -84 violations, +0 -0 fixes)

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

- airflow-core/docs/conf.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/apache:airflow/airflow-core/docs/conf.py`: `index out of bounds: the len is 0 but the index is 0`
+ airflow-core/docs/conf.py:107:6: COM812 [*] Trailing comma missing
+ airflow-core/docs/conf.py:146:5: ANN201 Missing return type annotation for public function `add_airflow_core_exclude_patterns_to_sphinx`
+ airflow-core/docs/conf.py:168:13: PERF401 Use `list.extend` to create a transformed list
+ airflow-core/docs/conf.py:172:13: PERF401 Use `list.extend` to create a transformed list
+ airflow-core/docs/conf.py:1:1: CPY001 Missing copyright notice at top of file
+ airflow-core/docs/conf.py:1:1: INP001 File `airflow-core/docs/conf.py` is part of an implicit namespace package. Add an `__init__.py`.
+ airflow-core/docs/conf.py:241:19: COM812 [*] Trailing comma missing
+ airflow-core/docs/conf.py:247:3: FIX002 Line contains TODO, consider resolving the issue
+ airflow-core/docs/conf.py:247:3: TD002 Missing author in TODO; try: `# TODO(): ...` or `# TODO @: ...`
+ airflow-core/docs/conf.py:247:3: TD003 Missing issue link for this TODO
+ airflow-core/docs/conf.py:345:29: PTH100 `os.path.abspath()` should be replaced by `Path.resolve()`
+ airflow-core/docs/conf.py:381:11: ANN001 Missing type annotation for function argument `sphinx`
+ airflow-core/docs/conf.py:381:5: ANN201 Missing return type annotation for public function `setup`
+ airflow-core/docs/conf.py:386:111: E501 Line too long (357 > 110)
+ airflow-core/docs/conf.py:72:3: FIX004 Line contains HACK, consider resolving the issue
+ airflow-core/docs/conf.py:84:48: FBT003 Boolean positional value in function call
- airflow-core/src/airflow/callbacks/callback_requests.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/apache:airflow/airflow-core/src/airflow/callbacks/callback_requests.py`: `index out of bounds: the len is 0 but the index is 0`
+ airflow-core/src/airflow/callbacks/callback_requests.py:131:67: COM812 [*] Trailing comma missing
+ airflow-core/src/airflow/callbacks/callback_requests.py:133:13: PLC0415 `import` should be at the top-level of a file
+ airflow-core/src/airflow/callbacks/callback_requests.py:134:13: PLC0415 `import` should be at the top-level of a file
+ airflow-core/src/airflow/callbacks/callback_requests.py:136:13: PLC0415 `import` should be at the top-level of a file
+ airflow-core/src/airflow/callbacks/callback_requests.py:137:13: PLC0415 `import` should be at the top-level of a file
+ airflow-core/src/airflow/callbacks/callback_requests.py:138:13: PLC0415 `import` should be at the top-level of a file
+ airflow-core/src/airflow/callbacks/callback_requests.py:149:22: COM812 [*] Trailing comma missing
+ airflow-core/src/airflow/callbacks/callback_requests.py:158:111: COM812 [*] Trailing comma missing
+ airflow-core/src/airflow/callbacks/callback_requests.py:19:29: TC003 Move standard library import `collections.abc.Mapping` into a type-checking block
+ airflow-core/src/airflow/callbacks/callback_requests.py:1:1: CPY001 Missing copyright notice at top of file
... 6335 additional changes omitted for project

apache/superset (+1155 -14 violations, +0 -0 fixes)

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

- docker/pythonpath_dev/superset_config.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/apache:superset/docker/pythonpath_dev/superset_config.py`: `index out of bounds: the len is 0 but the index is 0`
+ docker/pythonpath_dev/superset_config.py:123:16: PTH120 `os.path.dirname()` should be replaced by `Path.parent`
+ docker/pythonpath_dev/superset_config.py:124:21: PTH100 `os.path.abspath()` should be replaced by `Path.resolve()`
+ docker/pythonpath_dev/superset_config.py:125:65: COM812 [*] Trailing comma missing
+ docker/pythonpath_dev/superset_config.py:125:9: PTH118 `os.path.join()` should be replaced by `Path` with `/` operator
+ docker/pythonpath_dev/superset_config.py:128:41: PGH004 Use specific rule codes when using `noqa`
+ docker/pythonpath_dev/superset_config.py:141:84: COM812 [*] Trailing comma missing
+ docker/pythonpath_dev/superset_config.py:1:1: CPY001 Missing copyright notice at top of file
+ docker/pythonpath_dev/superset_config.py:1:1: D100 Missing docstring in public module
+ docker/pythonpath_dev/superset_config.py:1:1: INP001 File `docker/pythonpath_dev/superset_config.py` is part of an implicit namespace package. Add an `__init__.py`.
... 1159 additional changes omitted for project

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

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

- installer/pyinstaller/hook-samcli.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/aws:aws-sam-cli/installer/pyinstaller/hook-samcli.py`: `index out of bounds: the len is 0 but the index is 0`
+ installer/pyinstaller/hook-samcli.py:1:1: I001 [*] Import block is un-sorted or un-formatted
- samcli/commands/common/execution/history/options.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/aws:aws-sam-cli/samcli/commands/common/execution/history/options.py`: `index out of bounds: the len is 0 but the index is 0`
- samcli/hook_packages/terraform/copy_terraform_built_artifacts.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/aws:aws-sam-cli/samcli/hook_packages/terraform/copy_terraform_built_artifacts.py`: `index out of bounds: the len is 0 but the index is 0`
- tests/unit/commands/pipeline/bootstrap/test_guided_context.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/aws:aws-sam-cli/tests/unit/commands/pipeline/bootstrap/test_guided_context.py`: `index out of bounds: the len is 0 but the index is 0`
+ tests/unit/commands/pipeline/bootstrap/test_guided_context.py:119:9: PLR6301 Method `test_guided_context_will_not_prompt_for_fields_that_are_already_provided_oidc_gitlab` could be a function, class method, or static method
+ tests/unit/commands/pipeline/bootstrap/test_guided_context.py:1:1: I001 [*] Import block is un-sorted or un-formatted
+ tests/unit/commands/pipeline/bootstrap/test_guided_context.py:37:9: PLR6301 Method `test_guided_context_will_not_prompt_for_fields_that_are_already_provided` could be a function, class method, or static method
+ tests/unit/commands/pipeline/bootstrap/test_guided_context.py:412:9: PLR6301 Method `test_prompt_account_id_can_display_profiles_and_environment` could be a function, class method, or static method
+ tests/unit/commands/pipeline/bootstrap/test_guided_context.py:431:9: PLR6301 Method `test_prompt_account_id_wont_show_environment_option_when_it_doesnt_exist` could be a function, class method, or static method
... 4 additional changes omitted for project

bokeh/bokeh (+1383 -28 violations, +0 -0 fixes)

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

- docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/bokeh:bokeh/docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout.py`: `index out of bounds: the len is 0 but the index is 0`
+ docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout.py:1:1: CPY001 Missing copyright notice at top of file
+ docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout.py:1:1: D100 Missing docstring in public module
+ docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout.py:1:1: INP001 File `docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout.py` is part of an implicit namespace package. Add an `__init__.py`.
- docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout_responsive.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/bokeh:bokeh/docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout_responsive.py`: `index out of bounds: the len is 0 but the index is 0`
+ docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout_responsive.py:1:1: CPY001 Missing copyright notice at top of file
+ docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout_responsive.py:1:1: D100 Missing docstring in public module
+ docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout_responsive.py:1:1: INP001 File `docs/bokeh/source/docs/first_steps/examples/first_steps_6_row_layout_responsive.py` is part of an implicit namespace package. Add an `__init__.py`.
- examples/advanced/extensions/widget.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/bokeh:bokeh/examples/advanced/extensions/widget.py`: `index out of bounds: the len is 0 but the index is 0`
+ examples/advanced/extensions/widget.py:15:22: RUF012 Mutable default value for class attribute
... 1401 additional changes omitted for project

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

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

- install_files/ansible-base/callback_plugins/ansible_version_check.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/freedomofpress:securedrop/install_files/ansible-base/callback_plugins/ansible_version_check.py`: `index out of bounds: the len is 0 but the index is 0`

ibis-project/ibis (+42 -10 violations, +0 -0 fixes)

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

- docs/how-to/visualization/example_streamlit_app/example_streamlit_app.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/ibis-project:ibis/docs/how-to/visualization/example_streamlit_app/example_streamlit_app.py`: `index out of bounds: the len is 0 but the index is 0`
+ docs/how-to/visualization/example_streamlit_app/example_streamlit_app.py:6:18: PLC2701 Private name import `_` from external module `ibis`
- ibis/backends/tests/test_array.py: panic: Panicked at crates/ruff_python_semantic/src/definition.rs:285:26 when checking `/home/runner/work/ruff/ruff/checkouts/ibis-project:ibis/ibis/backends/tests/test_array.py`: `index out of bounds: the len is 0 but the index is 0`
+ ibis/backends/tests/test_array.py:149:33: FURB118 Use `operator.add` instead of defining a lambda
+ ibis/backends/tests/test_array.py:1573:5: PLR0917 Too many positional arguments (6/5)
+ ibis/backends/tests/test_array.py:161:12: FURB118 Use `operator.add` instead of defining a lambda
+ ibis/backends/tests/test_array.py:1765:39: FURB118 Use `operator.itemgetter(next(idx))` instead of defining a lambda
+ ibis/backends/tests/test_array.py:476:44: FURB118 Use `operator.itemgetter(slice(start, stop))` instead of defining a lambda
+ ibis/backends/tests/test_array.py:531:31: FURB118 Use `operator.add` instead of defining a lambda
+ ibis/backends/tests/test_array.py:643:31: FURB118 Use `operator.gt` instead of defining a lambda
... 1 additional changes omitted for rule FURB118
... 42 additional changes omitted for project

... Truncated remaining completed project reports due to GitHub comment length restrictions

Changes by rule (297 rules affected)

code total + violation - violation + fix - fix
ANN001 1374 1374 0 0 0
COM812 836 836 0 0 0
ANN201 815 815 0 0 0
PLR6301 462 462 0 0 0
DOC201 371 371 0 0 0
panic: 371 0 371 0 0
D212 370 370 0 0 0
ERA001 300 300 0 0 0
ANN202 256 256 0 0 0
D102 209 209 0 0 0
TRY003 200 200 0 0 0
PLC0415 197 197 0 0 0
E265 180 180 0 0 0
D103 163 163 0 0 0
ARG002 161 161 0 0 0
Q000 161 161 0 0 0
CPY001 138 138 0 0 0
RUF067 137 137 0 0 0
ANN401 132 132 0 0 0
S101 117 117 0 0 0
PLR0917 108 108 0 0 0
D205 105 105 0 0 0
EM102 103 103 0 0 0
EM101 100 100 0 0 0
T201 99 99 0 0 0
AIR311 98 98 0 0 0
DOC501 97 97 0 0 0
E501 93 93 0 0 0
E302 89 89 0 0 0
FBT001 86 86 0 0 0
PTH118 82 82 0 0 0
C408 82 82 0 0 0
SLF001 73 73 0 0 0
ANN204 73 73 0 0 0
E402 72 72 0 0 0
PLR6201 71 71 0 0 0
D100 70 70 0 0 0
PLR0913 70 70 0 0 0
FBT002 67 67 0 0 0
ANN003 66 66 0 0 0
FIX002 65 65 0 0 0
TD002 64 64 0 0 0
AIR001 64 64 0 0 0
TD003 63 63 0 0 0
D401 63 63 0 0 0
D101 62 62 0 0 0
D107 61 61 0 0 0
D210 58 58 0 0 0
TID252 58 58 0 0 0
ARG003 53 53 0 0 0
D415 49 49 0 0 0
PLR2004 48 48 0 0 0
D400 48 48 0 0 0
ARG001 44 44 0 0 0
Q002 43 43 0 0 0
C901 42 42 0 0 0
DTZ001 42 42 0 0 0
RET505 42 42 0 0 0
D300 41 41 0 0 0
RUF012 38 38 0 0 0
TC003 36 36 0 0 0
D105 34 34 0 0 0
LOG015 32 32 0 0 0
D200 32 32 0 0 0
B904 30 30 0 0 0
INP001 29 29 0 0 0
PTH123 29 29 0 0 0
PLR6104 28 28 0 0 0
PLC2701 27 27 0 0 0
RUF052 27 27 0 0 0
PLR0912 26 26 0 0 0
E261 26 26 0 0 0
RUF036 25 25 0 0 0
A002 24 24 0 0 0
RET504 23 23 0 0 0
D420 22 22 0 0 0
PTH120 22 22 0 0 0
PLW0603 22 22 0 0 0
S106 21 21 0 0 0
TC006 21 21 0 0 0
E305 21 21 0 0 0
PT007 20 20 0 0 0
BLE001 19 19 0 0 0
PLR0904 19 19 0 0 0
E241 18 18 0 0 0
E251 18 18 0 0 0
D404 17 17 0 0 0
FURB118 17 17 0 0 0
PLW1514 17 17 0 0 0
RUF031 16 16 0 0 0
SIM108 16 16 0 0 0
PGH003 16 16 0 0 0
N815 16 16 0 0 0
UP035 16 16 0 0 0
TC002 16 16 0 0 0
D202 16 16 0 0 0
PLR0914 15 15 0 0 0
PTH100 15 15 0 0 0
ANN205 15 15 0 0 0
RUF022 14 14 0 0 0
FBT003 14 14 0 0 0
PLR0915 14 14 0 0 0
PLR1702 14 14 0 0 0
DOC402 14 14 0 0 0
TRY400 14 14 0 0 0
PLW3201 14 14 0 0 0
ANN002 13 13 0 0 0
AIR321 13 13 0 0 0
D209 13 13 0 0 0
ISC004 12 12 0 0 0
D204 12 12 0 0 0
TD004 11 11 0 0 0
SIM102 11 11 0 0 0
SIM117 11 11 0 0 0
PLC1901 11 11 0 0 0
TRY300 10 10 0 0 0
SIM103 10 10 0 0 0
RSE102 10 10 0 0 0
FURB101 10 10 0 0 0
E266 10 10 0 0 0
PLR0911 9 9 0 0 0
RUF069 9 9 0 0 0
PTH110 9 9 0 0 0
D419 9 9 0 0 0
FIX004 8 8 0 0 0
TD006 8 8 0 0 0
N806 8 8 0 0 0
S108 8 8 0 0 0
PLC2801 8 8 0 0 0
PT019 8 8 0 0 0
RET503 8 8 0 0 0
UP006 8 8 0 0 0
PTH103 8 8 0 0 0
PERF401 7 7 0 0 0
ANN206 7 7 0 0 0
C416 7 7 0 0 0
TRY004 7 7 0 0 0
PTH119 7 7 0 0 0
TC001 7 7 0 0 0
TRY002 7 7 0 0 0
RUF065 7 7 0 0 0
UP031 7 7 0 0 0
S105 6 6 0 0 0
S404 6 6 0 0 0
ARG004 6 6 0 0 0
RUF043 6 6 0 0 0
FURB189 6 6 0 0 0
E221 6 6 0 0 0
E201 6 6 0 0 0
E202 6 6 0 0 0
A001 6 6 0 0 0
PLR5501 5 5 0 0 0
FURB110 5 5 0 0 0
TRY201 5 5 0 0 0
S403 5 5 0 0 0
ARG005 5 5 0 0 0
PGH004 5 5 0 0 0
UP045 5 5 0 0 0
E226 5 5 0 0 0
RUF070 5 5 0 0 0
RUF001 5 5 0 0 0
FURB103 5 5 0 0 0
PLR0916 5 5 0 0 0
FURB140 4 4 0 0 0
PERF203 4 4 0 0 0
RUF027 4 4 0 0 0
PTH107 4 4 0 0 0
TD005 4 4 0 0 0
B009 4 4 0 0 0
RUF100 4 4 0 0 0
G201 4 4 0 0 0
D413 4 4 0 0 0
DOC202 4 4 0 0 0
D208 4 4 0 0 0
S603 4 4 0 0 0
RUF029 4 4 0 0 0
RUF003 4 4 0 0 0
S607 4 4 0 0 0
PTH207 4 4 0 0 0
TRY301 3 3 0 0 0
C419 3 3 0 0 0
PTH111 3 3 0 0 0
FURB154 3 3 0 0 0
FURB142 3 3 0 0 0
FURB113 3 3 0 0 0
B905 3 3 0 0 0
SIM118 3 3 0 0 0
S608 3 3 0 0 0
RET501 3 3 0 0 0
PIE800 3 3 0 0 0
TD001 3 3 0 0 0
N802 3 3 0 0 0
S113 3 3 0 0 0
PLR1714 3 3 0 0 0
D418 3 3 0 0 0
I001 3 3 0 0 0
PLW2901 3 3 0 0 0
D417 3 3 0 0 0
B007 3 3 0 0 0
RET506 3 3 0 0 0
PYI036 3 3 0 0 0
PT018 3 3 0 0 0
TRY401 2 2 0 0 0
RUF021 2 2 0 0 0
PTH117 2 2 0 0 0
FLY002 2 2 0 0 0
PYI024 2 2 0 0 0
DTZ005 2 2 0 0 0
PIE790 2 2 0 0 0
SIM114 2 2 0 0 0
PTH208 2 2 0 0 0
SIM910 2 2 0 0 0
D104 2 2 0 0 0
RUF002 2 2 0 0 0
SIM105 2 2 0 0 0
PIE808 2 2 0 0 0
PD011 2 2 0 0 0
DOC102 2 2 0 0 0
D412 2 2 0 0 0
PYI016 2 2 0 0 0
FIX003 2 2 0 0 0
S314 2 2 0 0 0
ICN001 2 2 0 0 0
N813 2 2 0 0 0
S405 2 2 0 0 0
B903 2 2 0 0 0
DOC502 2 2 0 0 0
F541 2 2 0 0 0
PYI059 2 2 0 0 0
LOG004 2 2 0 0 0
PTH108 2 2 0 0 0
SIM113 2 2 0 0 0
PTH116 2 2 0 0 0
PLC0414 2 2 0 0 0
PTH113 2 2 0 0 0
RUF059 1 1 0 0 0
N817 1 1 0 0 0
PLR1730 1 1 0 0 0
N805 1 1 0 0 0
EXE001 1 1 0 0 0
B018 1 1 0 0 0
DTZ901 1 1 0 0 0
AIR002 1 1 0 0 0
N803 1 1 0 0 0
SIM401 1 1 0 0 0
FURB129 1 1 0 0 0
FURB171 1 1 0 0 0
C417 1 1 0 0 0
PTH106 1 1 0 0 0
PLR0402 1 1 0 0 0
FIX001 1 1 0 0 0
C401 1 1 0 0 0
S301 1 1 0 0 0
PLR1736 1 1 0 0 0
SIM201 1 1 0 0 0
SIM110 1 1 0 0 0
RUF005 1 1 0 0 0
S104 1 1 0 0 0
PYI032 1 1 0 0 0
PLW1508 1 1 0 0 0
UP007 1 1 0 0 0
RUF015 1 1 0 0 0
UP034 1 1 0 0 0
F401 1 1 0 0 0
NPY002 1 1 0 0 0
E225 1 1 0 0 0
B010 1 1 0 0 0
Q001 1 1 0 0 0
PYI030 1 1 0 0 0
B006 1 1 0 0 0
N812 1 1 0 0 0
E303 1 1 0 0 0
RET508 1 1 0 0 0
E301 1 1 0 0 0
E227 1 1 0 0 0
PTH109 1 1 0 0 0
ISC003 1 1 0 0 0
FURB188 1 1 0 0 0
E203 1 1 0 0 0
FURB148 1 1 0 0 0
ICN002 1 1 0 0 0
PYI013 1 1 0 0 0
PYI061 1 1 0 0 0
SIM101 1 1 0 0 0
PYI063 1 1 0 0 0
PYI019 1 1 0 0 0
S324 1 1 0 0 0
S606 1 1 0 0 0
PTH211 1 1 0 0 0
S311 1 1 0 0 0
PTH122 1 1 0 0 0
PTH202 1 1 0 0 0
D106 1 1 0 0 0
D403 1 1 0 0 0
RUF056 1 1 0 0 0
B901 1 1 0 0 0
S402 1 1 0 0 0

@ntBre
Copy link
Contributor Author

ntBre commented Feb 26, 2026

Well, I was wondering how this slipped through the ecosystem check, and I guess I either didn't notice or assumed it was a weird flake because it definitely showed up: #22205 (comment) 🤦

Maybe I should take a closer look this time as to why the numbers don't match up exactly (+10991 -371 here and +405 -32412 there), but the -371 panics here seems like a good start.

ntBre added a commit that referenced this pull request Feb 26, 2026
… (`PLR1712`) (#22205)"

This is an alternative to #23588, checking the ecosystem results in comparison.
@ntBre
Copy link
Contributor Author

ntBre commented Feb 26, 2026

#23592 (comment) shows the exact same ecosystem totals as seen here for a revert of #22205, so I think the other differences from the ecosystem report in #22205 are attributable to the change in the default rules.

@ntBre ntBre merged commit fd09d37 into main Feb 26, 2026
43 checks passed
@ntBre ntBre deleted the brent/fix-definition-panic branch February 26, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Panic] --preview --select ANN,PLR1712 crashes Ruff 0.15.3

2 participants