1
0
forked from VimPlug/jedi

Revert "Use __str__ instead of to_string"

This reverts commit 1151700114.
This commit is contained in:
Dave Halter
2019-07-31 18:39:17 +02:00
parent 7d2374ed81
commit a5a544cb09
5 changed files with 15 additions and 17 deletions

View File

@@ -531,7 +531,7 @@ class Definition(BaseDefinition):
typ = self.type
tree_name = self._name.tree_name
if typ == 'param':
return typ + ' ' + str(self._name)
return typ + ' ' + self._name.to_string()
if typ in ('function', 'class', 'module', 'instance') or tree_name is None:
if typ == 'function':
# For the description we want a short and a pythonic way.
@@ -633,13 +633,14 @@ class CallSignature(Definition):
return '<%s: index=%r %s>' % (
type(self).__name__,
self.index,
self._signature,
self._signature.to_string(),
)
def _format_signatures(context):
return '\n'.join(
str(signature) for signature in context.get_signatures()
signature.to_string()
for signature in context.get_signatures()
)