mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 21:25:08 +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 |
||
---|---|---|
.. | ||
.overrides | ||
assets | ||
editors | ||
formatter | ||
js | ||
stylesheets | ||
.gitignore | ||
configuration.md | ||
faq.md | ||
formatter.md | ||
installation.md | ||
integrations.md | ||
linter.md | ||
preview.md | ||
requirements-insiders.txt | ||
requirements.txt | ||
tutorial.md | ||
versioning.md |