Remove get_call_signature_for_any

This commit is contained in:
Dave Halter
2019-05-05 19:51:54 +02:00
parent 45a5eee18a
commit c0c1aff577
2 changed files with 0 additions and 14 deletions

View File

@@ -172,18 +172,6 @@ def get_call_signature(funcdef, width=72, call_string=None,
return '\n'.join(textwrap.wrap(code, width)) return '\n'.join(textwrap.wrap(code, width))
def get_call_signature_for_any(any_node):
call_signature = None
if any_node.type == 'classdef':
for funcdef in any_node.iter_funcdefs():
if funcdef.name.value == '__init__':
call_signature = \
get_call_signature(funcdef, call_string=any_node.name.value)
elif any_node.type in ('funcdef', 'lambdef'):
call_signature = get_call_signature(any_node)
return call_signature
def move(node, line_offset): def move(node, line_offset):
""" """
Move the `Node` start_pos. Move the `Node` start_pos.

View File

@@ -84,5 +84,3 @@ def test_get_call_signature(code, call_signature):
if node.type == 'simple_stmt': if node.type == 'simple_stmt':
node = node.children[0] node = node.children[0]
assert parser_utils.get_call_signature(node) == call_signature assert parser_utils.get_call_signature(node) == call_signature
assert parser_utils.get_call_signature_for_any(node) == call_signature