Given a list of lines, find all calls in this list. :param list|dict body: :rtype: list[Call]
(body)
| 95 | |
| 96 | |
| 97 | def make_calls(body): |
| 98 | """ |
| 99 | Given a list of lines, find all calls in this list. |
| 100 | |
| 101 | :param list|dict body: |
| 102 | :rtype: list[Call] |
| 103 | """ |
| 104 | calls = [] |
| 105 | for element in walk(body): |
| 106 | if element['type'] == 'CallExpression': |
| 107 | call = get_call_from_func_element(element) |
| 108 | if call: |
| 109 | calls.append(call) |
| 110 | elif element['type'] == 'NewExpression' and element['callee']['type'] == 'Identifier': |
| 111 | calls.append(Call(token=element['callee']['name'], |
| 112 | line_number=lineno(element))) |
| 113 | return calls |
| 114 | |
| 115 | |
| 116 | def process_assign(element): |
no test coverage detected