MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_setup_call

Function get_setup_call

src/packagedcode/pypi_setup_py.py:103–113  ·  view source on GitHub ↗

Return a setup() method call found in the ``elements`` or None.

(elements)

Source from the content-addressed store, hash-verified

101
102
103def get_setup_call(elements):
104 """
105 Return a setup() method call found in the ``elements`` or None.
106 """
107 for element in get_body(elements):
108 if is_setup_call(element):
109 return element
110 elif isinstance(element, (ast.Assign,)):
111 if isinstance(element.value, ast.Call):
112 if is_setup_call(element.value):
113 return element.value
114
115
116def node_to_value(node, body):

Callers 1

parse_setup_pyFunction · 0.85

Calls 2

get_bodyFunction · 0.85
is_setup_callFunction · 0.70

Tested by

no test coverage detected