MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / FunctionCallCollector

Class FunctionCallCollector

scripts/openapi.py:319–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317
318
319class FunctionCallCollector(cst.CSTVisitor):
320 def __init__(self):
321 super().__init__()
322 self._calls = []
323
324 @property
325 def calls(self):
326 return self._calls
327
328 def visit_Call(self, node: cst.Call) -> bool | None:
329 code = cst.Module([]).code_for_node
330 func_name = code(node.func)
331 args = [(f"{code(arg.keyword)}=" if arg.keyword else "") + code(arg.value) for arg in node.args]
332 self._calls.append((func_name, args))
333
334
335def get_class_docstring(node: cst.ClassDef) -> str | None:

Callers 1

visit_FunctionDefMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…