ruff/crates/ruff_python_semantic/src
Dylan 965a4dd731
[isort] Check full module path against project root(s) when categorizing first-party (#16565)
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
2025-05-05 11:40:01 -05:00
..
analyze Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
cfg Control flow: return and raise (#17121) 2025-04-03 08:30:29 -05:00
model Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
binding.rs [isort] Check full module path against project root(s) when categorizing first-party (#16565) 2025-05-05 11:40:01 -05:00
branches.rs Add branch detection to the semantic model (#6694) 2023-08-19 21:28:17 +00:00
context.rs Remove separate ReferenceContext enum (#4631) 2023-05-24 15:12:38 +00:00
definition.rs Make setting and retrieving pydocstyle settings less tedious (#12582) 2024-07-31 10:39:33 +01:00
globals.rs Refine SemanticModel lifetime bounds (#10221) 2024-03-04 09:21:13 +01:00
imports.rs Config error only when flake8-import-conventions alias conflicts with isort.required-imports bound name (#15918) 2025-02-04 17:05:35 -06:00
lib.rs Control flow graph: setup (#17064) 2025-04-01 05:53:42 -05:00
model.rs [pylint] Detect global declarations in module scope (PLE0118) (#17411) 2025-04-25 08:37:16 -04:00
nodes.rs Remove customizable reference enum names (#15647) 2025-01-21 13:46:31 -05:00
reference.rs [ruff] Avoid emitting assignment-in-assert when all references to the assigned variable are themselves inside asserts (RUF018) (#14661) 2024-11-29 13:36:59 +00:00
scope.rs Refactor semantic syntax error scope handling (#17314) 2025-04-09 14:23:29 -04:00
star_import.rs Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00