From 5212849780a0fdcffa4a34cd2fd5b839d030b82d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 20 Jun 2016 18:32:44 +0200 Subject: [PATCH] Fix the last known case of call signatures. Yay! --- jedi/api/helpers.py | 2 +- jedi/evaluate/helpers.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jedi/api/helpers.py b/jedi/api/helpers.py index c7abf2e0..79b34020 100644 --- a/jedi/api/helpers.py +++ b/jedi/api/helpers.py @@ -223,7 +223,7 @@ def _get_call_signature_details_from_error_node(node, position): # until the parentheses is enough. children = node.children[index:] name = element.get_previous_leaf() - if name.type == 'name' or name.parent.type == 'trailer': + if name.type == 'name' or name.parent.type in ('trailer', 'atom'): return CallSignatureDetails( element, *_get_index_and_key(children, position) diff --git a/jedi/evaluate/helpers.py b/jedi/evaluate/helpers.py index 5d1ccf39..9a0b32ba 100644 --- a/jedi/evaluate/helpers.py +++ b/jedi/evaluate/helpers.py @@ -80,6 +80,8 @@ def call_of_name(name, cut_own_trailer=False): # TODO remove cut_own_trailer option, since its always used with it. Just # ignore it, It's not what we want anyway. Or document it better? + # TODO rename this function, it's probably better called `call_of_leaf`, + # since it can also be used for closing parentheses?! """ trailer = name.parent if trailer.type != 'trailer':