Skip to content

✨ feat: Resolve relative imports to absolute module names#10

Merged
heumsi merged 1 commit intomainfrom
feat/resolve-relative-imports
Mar 30, 2026
Merged

✨ feat: Resolve relative imports to absolute module names#10
heumsi merged 1 commit intomainfrom
feat/resolve-relative-imports

Conversation

@heumsi
Copy link
Copy Markdown
Owner

@heumsi heumsi commented Mar 30, 2026

Summary

  • Resolve relative imports (e.g., from . import foo, from ..module import bar) to absolute module names in the parser
  • Previously, relative imports were silently skipped during analysis, meaning dependency violations via relative imports went undetected
  • Over-level relative imports (exceeding project root) are silently skipped

Closes #7

Test plan

  • from .sibling import x (level 1, with module) resolves correctly
  • from . import x (level 1, no module) resolves correctly
  • from ..other import y (level 2, with module) resolves correctly
  • Over-level relative import is silently skipped
  • Relative import from __init__.py resolves correctly
  • Existing tests still pass (40/40)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@heumsi heumsi force-pushed the feat/resolve-relative-imports branch from b189676 to eafc5ae Compare March 30, 2026 08:14
@heumsi heumsi merged commit dba95c3 into main Mar 30, 2026
5 checks passed
@heumsi heumsi deleted the feat/resolve-relative-imports branch March 30, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Document that relative imports are silently skipped

1 participant