mirror of https://github.com/astral-sh/ruff
## 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 |
||
|---|---|---|
| .. | ||
| basic.md | ||
| builtins.md | ||
| conditional.md | ||
| conflicts.md | ||
| errors.md | ||
| invalid_syntax.md | ||
| relative.md | ||
| stubs.md | ||
| tracking.md | ||