Use relative path imports#705
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Nanvix CPython build scripts under .nanvix/ to rely on nanvix-zutil v0.11.1’s relative path import support, removing the previous sys.path + _loader.load_sibling() boilerplate to improve editor/LSP behavior and linting.
Changes:
- Replaced
load_sibling(...)-based module loading with direct sibling imports across.nanvix/*.py. - Simplified a couple of long string constructions in
.nanvix/_docker.py. - Added targeted
pyrightignores where kwarg-dict typing is currently too broad.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.nanvix/z.py |
Switches to direct sibling imports; adds pyright ignores on kwarg expansions. |
.nanvix/ramfs.py |
Removes _loader bootstrapping and imports config directly. |
.nanvix/package.py |
Removes _loader bootstrapping and imports sibling modules directly. |
.nanvix/lxml.py |
Removes _loader bootstrapping and imports config directly. |
.nanvix/build.py |
Removes _loader bootstrapping; imports _docker/lxml/config directly. |
.nanvix/_test.py |
Removes _loader bootstrapping and imports sibling modules directly. |
.nanvix/_docker.py |
Removes _loader bootstrapping; minor string formatting simplification. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closed
ppenna
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR utilizes zutils v0.11.1's relative path import feature to simplify the boilerplate in the build scripts. This enables proper LSP support and better linting.
test.py and docker.py were moved to _test.py and _docker.py in order to avoid clashing with the existing docker directory and stdlib-reserved test module.
Note: Some pyright ignores were added in order to keep this PR minimal.