FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Resolve homedir references in Jedi environment path by odiroot · Pull Request #394 · python-lsp/python-lsp-server · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 5 additions & 0 deletions pylsp/workspace.py
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
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ def jedi_script(self, position=None, use_document_path=False):
jedi.settings.auto_import_modules = jedi_settings.get('auto_import_modules',
DEFAULT_AUTO_IMPORT_MODULES)
environment_path = jedi_settings.get('environment')
# Jedi itself cannot deal with homedir-relative paths.
# On systems, where it is expected, expand the home directory.
if environment_path and os.name != 'nt':
environment_path = os.path.expanduser(environment_path)

extra_paths = jedi_settings.get('extra_paths') or []
env_vars = jedi_settings.get('env_vars')

Expand Down

Back | FazBrowse Home | New Git URL