Skip to content

Commit 5ed736a

Browse files
authored
Merge pull request #2 from bnavigator/jedi18
bump jedi compatibility: compare to Path-like object
2 parents a91a257 + e442467 commit 5ed736a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Diff for: pyls/plugins/symbols.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@ def pyls_document_symbols(config, document):
3636
if (not sym_full_name.startswith(module_name) and
3737
not sym_full_name.startswith('__main__')):
3838
continue
39-
40-
if _include_def(d) and document.path == d.module_path:
39+
try:
40+
docismodule = os.path.samefile(document.path, d.module_path)
41+
except AttributeError:
42+
# Python 2 on Windows has no .samefile, but then these are
43+
# strings for sure
44+
docismodule = document.path == d.module_path
45+
46+
if _include_def(d) and docismodule:
4147
tuple_range = _tuple_range(d)
4248
if tuple_range in exclude:
4349
continue

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'configparser; python_version<"3.0"',
1111
'future>=0.14.0; python_version<"3"',
1212
'backports.functools_lru_cache; python_version<"3.2"',
13-
'jedi>=0.17.2,<0.18.0',
13+
'jedi>=0.17.2,<0.19.0',
1414
'python-jsonrpc-server>=0.4.0',
1515
'pluggy',
1616
'ujson<=2.0.3 ; platform_system!="Windows" and python_version<"3.0"',

0 commit comments

Comments
 (0)