1
0
forked from VimPlug/jedi

More goto improvements.

This commit is contained in:
Dave Halter
2014-11-21 15:45:17 +01:00
parent eb0bfb4381
commit 22fbcf6c77
3 changed files with 10 additions and 4 deletions

View File

@@ -590,16 +590,18 @@ class Definition(use_metaclass(CachedMetaClass, BaseDefinition)):
elif isinstance(d, pr.Module):
# only show module name
d = 'module %s' % self.module_name
else:
elif isinstance(d, pr.Param):
d = d.get_code()
else: # ExprStmt
first_leaf = d.first_leaf()
# Remove the prefix, because that's not what we want for get_code
# here.
old, first_leaf.prefix = first_leaf.prefix, ''
try:
d = d.get_code().replace('\n', '').replace('\r', '')
d = d.get_code()
finally:
first_leaf.prefix = old
return d
return d.replace('\n', '').replace('\r', '')
@property
def desc_with_module(self):