``Path(source_file).stem`` memoized. ``_module_stem_key`` runs this once per edge endpoint (176k calls on the graphify corpus) over a few thousand distinct source paths. Pure string transform; no invalidation needed.
(source_file: str)
| 6626 | |
| 6627 | @functools.lru_cache(maxsize=131072) |
| 6628 | def _source_file_stem(source_file: str) -> str: |
| 6629 | """``Path(source_file).stem`` memoized. |
| 6630 | |
| 6631 | ``_module_stem_key`` runs this once per edge endpoint (176k calls on the |
| 6632 | graphify corpus) over a few thousand distinct source paths. Pure string |
| 6633 | transform; no invalidation needed. |
| 6634 | """ |
| 6635 | return Path(source_file).stem |
| 6636 | |
| 6637 | |
| 6638 | def _stamp_python_fixture_paths(per_file: "list[dict | None]", root: Path) -> None: |