Files
ruff/crates
Micha Reiser 38351e00ee [red-knot] Partial revert of relative import handling for files in the root of a search path (#16001)
## 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
2025-02-07 11:04:09 +01:00
..
2025-02-06 13:24:45 -06:00
2025-02-07 10:59:40 +01:00
2025-02-07 10:59:40 +01:00
2025-02-07 10:59:40 +01:00
2025-02-06 13:24:45 -06:00