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

Function _file_node

graphify/extract.py:6854–6866  ·  view source on GitHub ↗
(nid: str)

Source from the content-addressed store, hash-verified

6852 return None
6853
6854 def _file_node(nid: str) -> "str | None":
6855 # Climb `contains` / `method` parents to the top, which is the file: a
6856 # nested function's `contains` parent is its enclosing function, not the
6857 # file, so stopping at the first parent compared a function to a file.
6858 seen: set[str] = set()
6859 parent: "str | None" = None
6860 while nid and nid not in seen:
6861 seen.add(nid)
6862 up = file_of_node.get(nid) or method_class.get(nid)
6863 if not up:
6864 return parent
6865 parent = nid = up
6866 return None
6867
6868 resolved_call_sites: dict[tuple[str, tuple[int, ...]], set[str]] = {}
6869

Callers 2

_inherited_methodFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected