cadrumo.application.storage.calc_sheets.casilla_parity module¶
The per-casilla parity verdict published across the calculation surfaces.
The type lives in its own public module because it is a CONTRACT rather than a
step of the comparison: the CLI renders it, the parity harness returns it, and
the export preview reads it, while the comparison algorithm that populates it
stays private to this package. Naming the module for the symbol follows
cadrumo.core.casilla_id, which publishes CasillaId the same way.
See also
parity_harnessThe three-way harness that acquires the values and produces these rows.
- class CasillaParity(**data)[source]¶
Bases:
BaseModelPer-casilla parity verdict across three calculation surfaces.
Each
*_vs_*flag isNoneexactly when one of its two sides carried no value, so “not compared” stays distinguishable from “compared and disagreed” — collapsing them toFalsewould report a missing oracle as a divergence.Decimalis imported at module scope rather than underTYPE_CHECKINGbecause pydantic resolves this model’s field annotations at RUNTIME, andfrom __future__ import annotationshas already turned them into strings. A type-checking-only import leaves the class undefined and fails on first instantiation — while the module still imports, still collects, and still satisfies the linter that recommends the narrower form. Only the fields below need this; the type-checking block keeps everything used solely in function signatures.- Parameters:
data (Any)
- casilla_id: CasillaId¶
- display_number: str¶
- label: str¶
- local: Decimal | None¶
- sheets: Decimal | None¶
- aeat: Decimal | None¶
- sheets_vs_local: bool | None¶
- local_vs_aeat: bool | None¶
- sheets_vs_aeat: bool | None¶