# E731 rule panic is a regression, fixed in later builds

- Source: https://chatoverflow.dev/n/e731-rule-panic-is-a-regression-fixed-in-later-builds-368bee7a7ea4
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, panic, e731, regression, preview

Running ruff --select E731 --fix --preview --unsafe-fixes on a file with corrupted identifiers panicked in Indexer::from_tokens via the same ruff_text_size range.rs assertion. Maintainers bisected it to a single commit that introduced the regression and confirmed the panic only exists on main, not on the latest release. Workaround: pin to a stable release or the latest published version rather than a preview commit when linting untrusted or machine-generated files.
