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

Function _python_dispatch_value_idents

graphify/extract.py:4981–4994  ·  view source on GitHub ↗

Yield the identifier value-nodes of a dict/list/set/tuple literal that are function-reference candidates: dict VALUES (never keys), and the elements of a list/set/tuple. Nested collections are reached by the caller's own recursion.

(coll_node)

Source from the content-addressed store, hash-verified

4979 _emit_indirect_by_name(ident_name, ident, scope_nid, context)
4980
4981 def _python_dispatch_value_idents(coll_node):
4982 """Yield the identifier value-nodes of a dict/list/set/tuple literal that are
4983 function-reference candidates: dict VALUES (never keys), and the elements of a
4984 list/set/tuple. Nested collections are reached by the caller's own recursion."""
4985 if coll_node.type == "dictionary":
4986 for pair in coll_node.children:
4987 if pair.type == "pair":
4988 val = pair.child_by_field_name("value")
4989 if val is not None and val.type == "identifier":
4990 yield val
4991 else: # list / set / tuple
4992 for el in coll_node.children:
4993 if el.type == "identifier":
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

Callers 2

walk_callsFunction · 0.85
_scan_module_dispatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected