INNER CODE UNIT · Python
is_commit
pineforge-4pass/pineforge-engine · benchmarks/check_provenance.py:120
def is_commit(self, sha: str) -> bool:
return self._git("cat-file", "-e", f"{sha}^{{commit}}").returncode == 0
@dataclass(frozen=True)
class Num:
"""A derived value; the README may round it to the digits it prints."""
value: float
slack: float = 0.0 # rounding the source itself already carries
scale: float = 1.0 # the printed unit: 1e3 for "603k", 1e6 for "0.64 M"
@dataclass(frozen=True)
class Prefix:
"""A full sha the README abbreviates."""
full: str