MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / make_calls

Function make_calls

code2flow/python.py:41–57  ·  view source on GitHub ↗

Given a list of lines, find all calls in this list. :param lines list[ast]: :rtype: list[Call]

(lines)

Source from the content-addressed store, hash-verified

39
40
41def make_calls(lines):
42 """
43 Given a list of lines, find all calls in this list.
44
45 :param lines list[ast]:
46 :rtype: list[Call]
47 """
48
49 calls = []
50 for tree in lines:
51 for element in ast.walk(tree):
52 if type(element) != ast.Call:
53 continue
54 call = get_call_from_func_element(element.func)
55 if call:
56 calls.append(call)
57 return calls
58
59
60def process_assign(element):

Callers 2

make_nodesMethod · 0.70
make_root_nodeMethod · 0.70

Calls 1

Tested by

no test coverage detected