MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _render_cached

Function _render_cached

SLiCAP/schematic/latex_label.py:244–251  ·  view source on GitHub ↗
(expr_str: str)

Source from the content-addressed store, hash-verified

242
243
244def _render_cached(expr_str: str) -> bytes | None:
245 path = _cache_path(expr_str)
246 if path.exists():
247 return path.read_bytes()
248 svg = _render_fresh(expr_str)
249 if svg is not None:
250 path.write_bytes(svg)
251 return svg
252
253
254def _render_fresh(expr_str: str) -> bytes | None:

Callers 2

svg_line_heightFunction · 0.85
render_expressionFunction · 0.85

Calls 2

_cache_pathFunction · 0.85
_render_freshFunction · 0.85

Tested by

no test coverage detected