mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
![]() 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 |
||
---|---|---|
.. | ||
basic.md | ||
builtins.md | ||
conditional.md | ||
conflicts.md | ||
errors.md | ||
invalid_syntax.md | ||
relative.md | ||
stubs.md | ||
tracking.md |