MCPcopy Create free account
hub / github.com/idank/explainshell / _format_delta

Function _format_delta

tests/evals/_common.py:109–113  ·  view source on GitHub ↗
(before: int | float, after: int | float)

Source from the content-addressed store, hash-verified

107
108
109def _format_delta(before: int | float, after: int | float) -> str:
110 delta = after - before
111 if isinstance(before, float) or isinstance(after, float):
112 return f"{before:.2f} -> {after:.2f} ({delta:+.2f})"
113 return f"{before} -> {after} ({delta:+})"
114
115
116def _write_json(path: Path, data: Any) -> None:

Callers 2

_changed_metric_linesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected