Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include the parent package of the execution source in search paths #172

Merged
merged 7 commits into from
Sep 16, 2023

Conversation

Glyphack
Copy link
Owner

@Glyphack Glyphack commented Sep 13, 2023

I think a good solution for now is to go upwards until there is no more init.py and include that final dir in the search path. This allows to use imports like from pkg import a where pkg is a user directory and the source script is located inside pkg.

@Glyphack Glyphack merged commit 3d33839 into main Sep 16, 2023
1 check passed
@Glyphack Glyphack deleted the import-resolver branch September 16, 2023 15:07
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.

1 participant