Skip to content

Commit a76f2e6

Browse files
committed
Remove type annotation because it will break Python 2 build.
1 parent e363239 commit a76f2e6

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

pyls/plugins/symbols.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Copyright 2017 Palantir Technologies, Inc.
22
import logging
3-
from jedi.api.classes import Definition
43
from pyls import hookimpl
54
from pyls.lsp import SymbolKind
65

@@ -11,11 +10,11 @@
1110
def pyls_document_symbols(config, document):
1211
# all_scopes = config.plugin_settings('jedi_symbols').get('all_scopes', True)
1312
definitions = document.jedi_names(all_scopes=False)
14-
def transform(d: Definition):
15-
includeD = _include_def(d)
16-
if includeD is None:
13+
def transform(d):
14+
include_d = _include_def(d)
15+
if include_d is None:
1716
return None
18-
children = [dt for dt in (transform(d1) for d1 in d.defined_names()) if dt] if includeD else None
17+
children = [dt for dt in (transform(d1) for d1 in d.defined_names()) if dt] if include_d else None
1918
detailName = d.full_name
2019
if detailName and detailName.startswith("__main__."):
2120
detailName = detailName[9:]

setup.cfg

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ exclude = test/plugins/.ropeproject,test/.ropeproject
1313

1414
[tool:pytest]
1515
testpaths = test
16-
addopts =
17-
--cov-report html --cov-report term --junitxml=pytest.xml
18-
--cov pyls --cov test
16+

0 commit comments

Comments
 (0)