From d0eb8137e25a795916219f2194544cddae130f6c Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 21 Jun 2016 18:39:35 +0200 Subject: [PATCH] Remove old unused call_of_name madness. --- jedi/evaluate/helpers.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/jedi/evaluate/helpers.py b/jedi/evaluate/helpers.py index 490992bf..fa385f91 100644 --- a/jedi/evaluate/helpers.py +++ b/jedi/evaluate/helpers.py @@ -105,32 +105,6 @@ def call_of_name(leaf, cut_own_trailer=False): return transformed return power - if 1: - par = par.parent - if par.children[0] in ('(', '['): - # The trailer is not a NAME.NAME trailer, but a call to something. - return name - - power = par.parent - # `atom_expr` got introduced in Python 3.5 and is essentially just the - # whole call part without the optional ** power element. - if power.type in ('power', 'atom_expr') \ - and power.children[0] != name \ - and not (power.children[-2] == '**' and - name.start_pos > power.children[-1].start_pos): - par = power - # Now the name must be part of a trailer - index = par.children.index(name.parent) - if index != len(par.children) - 1 or cut_own_trailer: - # Now we have to cut the other trailers away. - par = deep_ast_copy(par) - if not cut_own_trailer: - # Normally we would remove just the stuff after the index, but - # if the option is set remove the index as well. (for goto) - index = index + 1 - par.children[index:] = [] - - return par def get_names_of_node(node):