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
Previously raised for Jedi project but deemed irrelevant at their level.
When using Virtualenvwrapper, or just for convenience keeping all the virtual Python environments in one directory, it's not possible to
to use user home directory references in pylsp.plugins.jedi.environment. E.g. ~/.virtualenvs/myenv1.
Neither python-lsp-server nor Jedi don't expand ~.
This is a small thing but prevents effective sharing of dev environments between users (because the username would have to be explicitly hardcoded here).
I suggest using os.path.expanduser in this function:
Hey @odiroot, thanks for reporting. Ok, I'm fine with this suggestion, so please submit a pull request for it.
My only recommendation is to make this work only for non-Windows systems (i.e. if not os.name == 'nt') because I think the tilde (~) doesn't map to HOME there.
Hi @ccordoba12
Thanks. According to the documentation, it shouldn't be breaking anything on Windows. But as you suggest, this is somewhat an unexpected thing so I can add that check.
Previously raised for Jedi project but deemed irrelevant at their level.
When using Virtualenvwrapper, or just for convenience keeping all the virtual Python environments in one directory, it's not possible to
to use user home directory references in
pylsp.plugins.jedi.environment
. E.g.~/.virtualenvs/myenv1
.Neither python-lsp-server nor Jedi don't expand
~
.This is a small thing but prevents effective sharing of dev environments between users (because the username would have to be explicitly hardcoded here).
I suggest using
os.path.expanduser
in this function:python-lsp-server/pylsp/workspace.py
Lines 380 to 401 in 297099c
The text was updated successfully, but these errors were encountered: