mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
## Summary This PR reverts the behavior changes from https://github.com/astral-sh/ruff/pull/15990 But it isn't just a revert, it also: * Adds a test covering this specific behavior * Preserves the improvement to use `saturating_sub` in the package case to avoid overflows in the case of invalid syntax * Use `ancestors` instead of a `for` loop ## Test Plan Added test