Build a stable node ID from one or more name parts.
(*parts: str)
| 8 | |
| 9 | |
| 10 | def _make_id(*parts: str) -> str: |
| 11 | """Build a stable node ID from one or more name parts.""" |
| 12 | combined = "_".join(p.strip("_.") for p in parts if p) |
| 13 | cleaned = re.sub(r"[^a-zA-Z0-9]+", "_", combined) |
| 14 | return cleaned.strip("_").lower() |
| 15 | |
| 16 | |
| 17 | def extract_python(path: Path) -> dict: |
no outgoing calls