Skip to content

Resolve homedir references in Jedi environment path #394

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

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

odiroot
Copy link
Contributor

@odiroot odiroot commented Jun 13, 2023

Resolves: #393

Allows easier use with virtualenvwrapper and portability of LSP configuration.

@odiroot
Copy link
Contributor Author

odiroot commented Jun 13, 2023

@ccordoba12 I struggled to come up with a test for it.

I can use the doc fixture and go with

script = doc.jedi_script()
path = script._inference_state.environment.path
assert ...

But I have no idea how to inject my custom Jedi plugin configuration to that doc. It just follows my global settings.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestion, the rest looks good to me.

Also, don't worry about adding a test for this. I think it's a very simple addition that doesn't merit a test.

@ccordoba12 ccordoba12 added this to the v1.7.4 milestone Jun 13, 2023
Removed debugging cruft.

Co-authored-by: Carlos Cordoba <[email protected]>
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @odiroot!

@ccordoba12 ccordoba12 merged commit 05ecbdc into python-lsp:develop Jun 29, 2023
@odiroot odiroot deleted the mo/homedir-env branch June 29, 2023 15:42
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jul 5, 2023
## Version 1.7.4 (2023/06/29)

### Issues Closed

* [Issue 393](python-lsp/python-lsp-server#393) - Environment path doesn't expand user directory

In this release 1 issue was closed.

### Pull Requests Merged

* [PR 394](python-lsp/python-lsp-server#394) - Resolve homedir references in Jedi environment path, by [@odiroot](https://github.com/odiroot)
* [PR 381](python-lsp/python-lsp-server#381) - Report progress even when initialization fails, by [@syphar](https://github.com/syphar)
* [PR 380](python-lsp/python-lsp-server#380) - Fix pylint hang on file with many errors, by [@hetmankp](https://github.com/hetmankp)

In this release 3 pull requests were closed.
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.

Environment path doesn't expand user directory
2 participants