INNER CODE UNIT · Python

_collect_leaf

blockscout/blockscout · .agents/skills/openapi-spec/scripts/leaf-schemas-collect-facts.py:80

def _collect_leaf(path: pathlib.Path) -> dict:
    source = path.read_text()
    match = DEFMODULE_RE.search(source)
    full_module = match.group(1) if match else None
    short_name = (
        full_module.rsplit(".", 1)[-1] if full_module else path.stem
    )
    return {
        "module": full_module,
        "short_name": short_name,
        "path": str(path.relative_to(REPO_ROOT)),
        "source": source,
        "callsites": _find_callsites(short_name, exclude_path=path),
    }


def _find_callsites(
    short_name: str,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…