Skip to content

Commit 35a740f

Browse files
committed
should now work with jedi > 0.10; older versions will no longer work
1 parent fc94fa3 commit 35a740f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyqode/python/backend/workers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _extract_def(d, path):
9292
# check for methods in class or nested methods/classes
9393
if d.type == "class" or d.type == 'function':
9494
try:
95-
sub_definitions = d.defined_names()
95+
sub_definitions = d.names()
9696
for sub_d in sub_definitions:
9797
if (d.type == 'function' and sub_d.type == 'function') or \
9898
d.type == 'class':
@@ -109,7 +109,7 @@ def defined_names(request_data):
109109
global _old_definitions
110110
ret_val = []
111111
path = request_data['path']
112-
toplvl_definitions = jedi.defined_names(
112+
toplvl_definitions = jedi.names(
113113
request_data['code'], path, 'utf-8')
114114
for d in toplvl_definitions:
115115
definition = _extract_def(d, path)
@@ -135,7 +135,7 @@ def quick_doc(request_data):
135135
except jedi.NotFoundError:
136136
return []
137137
else:
138-
ret_val = [d.doc for d in definitions]
138+
ret_val = [d.docstring() for d in definitions]
139139
return ret_val
140140

141141

0 commit comments

Comments
 (0)