From 1e0ae6bd35e8d9471fa6b936d3e86bfe56908f30 Mon Sep 17 00:00:00 2001 From: ZHU Jie M Date: Tue, 14 Oct 2014 18:33:05 +0800 Subject: [PATCH] Fix upstream #311 Use method `docstring()` instead of property `doc` Use property `description` instead of `get_code` --- jedi_vim.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jedi_vim.py b/jedi_vim.py index c5b1ead..f5f9fda 100644 --- a/jedi_vim.py +++ b/jedi_vim.py @@ -131,7 +131,7 @@ def completions(): abbr=PythonToVimStr(c.name), # stuff directly behind the completion menu=PythonToVimStr(c.description), - info=PythonToVimStr(c.doc), # docstr + info=PythonToVimStr(c.docstring()), # docstr icase=1, # case insensitive dup=1 # allow duplicates (maybe later remove this) ) @@ -219,8 +219,8 @@ def show_documentation(): echo_highlight('No documentation found for that.') vim.command('return') else: - docs = ['Docstring for %s\n%s\n%s' % (d.desc_with_module, '=' * 40, d.doc) - if d.doc else '|No Docstring for %s|' % d for d in definitions] + docs = ['Docstring for %s\n%s\n%s' % (d.desc_with_module, '=' * 40, d.docstring()) + if d.docstring() else '|No Docstring for %s|' % d for d in definitions] text = ('\n' + '-' * 79 + '\n').join(docs) vim.command('let l:doc = %s' % repr(PythonToVimStr(text))) vim.command('let l:doc_lines = %s' % len(text.split('\n'))) @@ -268,7 +268,7 @@ def show_call_signatures(signatures=()): # TODO check if completion menu is above or below line = vim_eval("getline(%s)" % line_to_replace) - params = [p.get_code().replace('\n', '') for p in signature.params] + params = [p.description.replace('\n', '') for p in signature.params] try: params[signature.index] = '*%s*' % params[signature.index] except (IndexError, TypeError):