-
Notifications
You must be signed in to change notification settings - Fork 161
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
Configure auto-import to omit src from import statements #753
Comments
I've created a repo to show an example of what currently happens when using rope in pylsp for importing a function: |
It'd be better to have it automatically use another venv path. You can probably do this in pylsp by editing the rope config. |
Maybe rope could read poetry's section in pyproject.toml to find the real application's root? The |
Is your feature request related to a problem? Please describe.
I work in python projects that use poetry for dependency management, and use a
src/
folder for the repository. When importing an anything from within the repo, rope defaults to importing relative to the root directory, instead of from the package source.e.g.
Describe the solution you'd like
I'd like to be able to set a configuration for rope (eg in
pytool.toml
) to tell Rope to not reference thesrc
in the import, and instead just use the repo name.e.g.
Describe alternatives you've considered
See discussion in pylsp: python-lsp/python-lsp-server#525
I've experimented with changing the existing config of
python_files
andsource_folders
, but this hasn't given much success.Additional context
I use rope as part of pylsp.
The text was updated successfully, but these errors were encountered: