You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
fromsrc.REPO.ximporty
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 the src in the import, and instead just use the repo name.
e.g.
pytool.toml is global config file, unless you want this to be applied to all of your projects (which is unlikely), you'll likely want to use a local config file for this purpose, rope reads [tool.rope] section in pyproject.toml but projectroot is given by the integration (pylsp in this case) rather than something you can configure from pyproject.toml.
Maybe rope could read poetry's section in pyproject.toml to find the real application's root? The Project(projectroot) is where you might want to poke around to see if setting the projectroot as projectroot (from editor/lsp server) / src_path_from_pyproject_toml might work.
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: