INNER CODE UNIT · Python
Prefix
pineforge-4pass/pineforge-engine · benchmarks/check_provenance.py:134
class Prefix:
"""A full sha the README abbreviates."""
full: str
@dataclass(frozen=True)
class Commit:
"""A sha that must name a commit of this repository."""
tree: Tree
def printed(text: str) -> tuple[float, int]:
"""The README's number and the decimals it prints."""
if text.lower() in WORDS:
return float(WORDS[text.lower()]), 0
plain = text.replace(",", "")
return float(plain), len(plain.split(".")[1]) if "." in plain else 0