feat: resolve namespace package submodule imports#32
Conversation
|
Validation:
Note: full |
|
Thanks for the focused change. I found one issue I’d fix before merging.
Because this is the core graph extractor, that can hide dependency edges in mixed alias imports. Please preserve an external edge for unresolved aliases, or preserve the original external base edge when not every alias resolves internally, and add a regression test for that case. |
|
@copilot resolve the merge conflicts in this pull request |
Resolved by merging |
Pull Request
Adds support for resolving submodule imports from namespace packages that do not contain
__init__.pyfiles.Previously, imports like
from namespace_pkg.domain import modelcould be treated as external whennamespace_pkg/domain/was a namespace package directory. This change adds a targeted fallback that resolves imported aliases as submodules only when the base import cannot be resolved internally.Also adds regression tests for absolute and relative namespace-package imports and documents the behavior in the README.
Change Type