mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-21 19:05:09 +00:00
![]() When attempting to determine whether `import foo.bar.baz` is a known first-party import relative to [user-provided source paths](https://docs.astral.sh/ruff/settings/#src), when `preview` is enabled we now check that `SRC/foo/bar/baz` is a directory or `SRC/foo/bar/baz.py` or `SRC/foo/bar/baz.pyi` exist. Previously, we just checked the analogous thing for `SRC/foo`, but this can be misleading in situations with disjoint namespace packages that share a common base name (e.g. we may be working inside the namespace package `foo.buzz` and importing `foo.bar` from elsewhere). Supersedes #12987 Closes #12984 |
||
---|---|---|
.. | ||
analyze | ||
cfg | ||
model | ||
binding.rs | ||
branches.rs | ||
context.rs | ||
definition.rs | ||
globals.rs | ||
imports.rs | ||
lib.rs | ||
model.rs | ||
nodes.rs | ||
reference.rs | ||
scope.rs | ||
star_import.rs |