MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / _source_slice

Function _source_slice

src/pyspector/ast_cache.py:80–83  ·  view source on GitHub ↗
(lines: List[str], node: ast.stmt)

Source from the content-addressed store, hash-verified

78
79
80def _source_slice(lines: List[str], node: ast.stmt) -> str:
81 start = node.lineno - 1 # ast.lineno is 1-based
82 end = getattr(node, "end_lineno", node.lineno)
83 return "".join(lines[start:end])
84
85
86# ── Module JSON assembly ─────────────────────────────────────────────────────

Callers 2

_chunk_hashesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected