Skip to content

Commit 6a4a61e

Browse files
committed
fix #727
1 parent 4a8319e commit 6a4a61e

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

.vscode/launch.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
"name": "Launch Extension as debugServer", // https://code.visualstudio.com/docs/extensions/example-debuggers
2020
"type": "node",
2121
"request": "launch",
22-
"runtimeArgs": [
23-
"--harmony"
24-
],
2522
"program": "${workspaceRoot}/out/client/debugger/Main.js",
2623
"stopOnEntry": false,
2724
"args": [

pythonFiles/completion.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ def _serialize_completions(self, script, identifier=None, prefix=''):
155155
'raw_type': '',
156156
'rightLabel': self._additional_info(signature)
157157
}
158+
_completion['description'] = ''
159+
_completion['raw_docstring'] = ''
160+
158161
# we pass 'text' here only for fuzzy matcher
159162
if value:
160163
_completion['snippet'] = '%s=${1:%s}$0' % (name, value)
@@ -188,6 +191,15 @@ def _serialize_completions(self, script, identifier=None, prefix=''):
188191
'raw_docstring': completion.docstring(raw=True),
189192
'rightLabel': self._additional_info(completion)
190193
}
194+
for c in _completions:
195+
if c['text'] == _completion['text']:
196+
c['type'] = _completion['type']
197+
c['raw_type'] = _completion['raw_type']
198+
if len(c['description']) == 0 and len(c['raw_docstring']) == 0:
199+
c['description'] = _completion['description']
200+
c['raw_docstring'] = _completion['description']
201+
202+
191203
if any([c['text'].split('=')[0] == _completion['text']
192204
for c in _completions]):
193205
# ignore function arguments we already have
@@ -388,7 +400,7 @@ def _serialize_tooltip(self, definitions, identifier=None):
388400
if definition.type == 'module':
389401
signature = definition.full_name
390402
description = definition.docstring(raw=True).strip()
391-
if not description and not definition.get_line_code():
403+
if not description and hasattr(definition, 'get_line_code'):
392404
# jedi returns an empty string for compiled objects
393405
description = definition.docstring().strip()
394406
_definition = {

0 commit comments

Comments
 (0)