Unquote parsed urls in both Workspace and Document#80
Unquote parsed urls in both Workspace and Document#80gatesn merged 5 commits intopalantir:developpalantir/python-language-server:developfrom tomv564:fix_urlencoded_pathtomv564/python-language-server:fix_urlencoded_pathCopy head branch name to clipboard
Conversation
|
Thanks for your interest in palantir/python-language-server, @tomv564! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
pyls/workspace.py
Outdated
| def __init__(self, root, lang_server=None): | ||
| self._url_parsed = urlparse(root) | ||
| self.root = self._url_parsed.path | ||
| self.root = unquote(self._url_parsed.path) |
There was a problem hiding this comment.
Would it be better to unquote, and then url parse? That way any future references to self._url_parsed are correct.
test/test_workspace.py
Outdated
| import os | ||
| import pytest | ||
| from pyls import workspace | ||
| from pyls.workspace import Workspace |
There was a problem hiding this comment.
can you reference workspace.Workspace instead of adding another import.
|
Thanks very much for this! Made a couple of comments, after which it looks good to merge. Shame we can't get Circle to run for forks though. |
|
Fixed both your suggestions, thanks for the review! |
|
I've cloned and tested locally, all looks good! Released in 0.2.3 |
Naïve fix for #79, where document URIs containing encoded spaces (
%20) were not url decoded before being passed to Jedi.Fix also applied to Workspace, as it is already written to handle URIs.