MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _python_ref_value_idents

Function _python_ref_value_idents

graphify/extract.py:4996–5008  ·  view source on GitHub ↗

Identifiers on the VALUE side of an assignment RHS or a return: a bare name (`cb = handler`, `return handler`) or the elements of a bare unpack (`a, b = f, g`). A collection LITERAL on the RHS (`cb = [f]`, `cb = (f, g)`) is a dispatch table reached by the normal recursion, so

(value_node)

Source from the content-addressed store, hash-verified

4994 yield el
4995
4996 def _python_ref_value_idents(value_node):
4997 """Identifiers on the VALUE side of an assignment RHS or a return: a bare name
4998 (`cb = handler`, `return handler`) or the elements of a bare unpack
4999 (`a, b = f, g`). A collection LITERAL on the RHS (`cb = [f]`, `cb = (f, g)`) is a
5000 dispatch table reached by the normal recursion, so it is not handled here."""
5001 if value_node is None:
5002 return
5003 if value_node.type == "identifier":
5004 yield value_node
5005 elif value_node.type == "expression_list":
5006 for ch in value_node.children:
5007 if ch.type == "identifier":
5008 yield ch
5009
5010 def _getattr_ref_name(call_node):
5011 """If ``call_node`` is a builtin ``getattr(obj, "name"[, default])`` whose name

Callers 2

walk_callsFunction · 0.85
_scan_module_dispatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected