Skip to content

Commit

Permalink
fix getting signatures in jedi 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Apr 21, 2020
1 parent f225a13 commit 95ab5c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions IPython/core/completer.py
Expand Up @@ -988,6 +988,11 @@ def _make_signature(completion)-> str:
"""

# it looks like this might work on jedi 0.17
if hasattr(completion, 'get_signatures'):
c0 = completion.get_signatures()[0]
return '('+c0.to_string().split('(', maxsplit=1)[1]

return '(%s)'% ', '.join([f for f in (_formatparamchildren(p) for signature in completion.get_signatures()
for p in signature.defined_names()) if f])

Expand Down

0 comments on commit 95ab5c5

Please sign in to comment.