ruff/crates/red_knot_python_semantic
Douglas Creager e8e461da6a
Prioritize attribute in from/import statement (#15041)
This tweaks the new semantics from #15026 a bit when a symbol could be
interpreted both as an attribute and a submodule of a package. For
`from...import`, we should actually prioritize the attribute, because of
how the statement itself is implemented [1].

> 1. check if the imported module has an attribute by that name
> 2. if not, attempt to import a submodule with that name and then check
the imported module again for that attribute

[1] https://docs.python.org/3/reference/simple_stmts.html#the-import-statement
2024-12-17 16:58:23 -05:00
..
resources Prioritize attribute in from/import statement (#15041) 2024-12-17 16:58:23 -05:00
src Prioritize attribute in from/import statement (#15041) 2024-12-17 16:58:23 -05:00
tests mdtest: include test name in printed rerun command (#14684) 2024-11-30 11:01:06 +00:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml Add tracing support to mdtest (#14935) 2024-12-13 09:10:01 +00:00