betting_combat.rounds.identity.checks
check: the registry’s invariants. Any breach raises IdentityError listing every
breach found; nothing downstream may run on a registry that fails.
ids every fighter_uid 'F' + 5 digits, event_uid 'E' + 5, bout_uid 'B' + 6, each oncekeys each (source, key) of fighters, events and bouts bound once, to a known one, of a known source; a fighter with two UFCStats pages, an event or a bout with two UFCStats ids, is a breach (one person with two pages is pinned by hand, never left to chance)merges each fighter merged once, into another known one, never into himself or around a cycle; never a fighter with a UFCStats page merged awaysides each UFCStats bout side (fight, name) once, to a known fighter; a fight's sides two different fighters (a renamed side is one of them again), every fighter canonical (through the merges)bouts two known fighters, different and sorted; fighter A one of them and the hash's (``a_slot_of``); a known event of the same date; rounds 1-5 (None only before 2001); division one of ``common.DIVISION_LBS`` or 'Other'; women and title set; a bout's UFCStats sides its two fighters; a live bout (no UFCStats id) scheduled for 3 or 5 roundscalendar of the bouts held (UFCStats lists them): a fighter in two bouts within a day of each other, from 2001 on (the 1990s tournaments fought several bouts a night); one pair in two bouts within a day. A live bout UFCStats never listed (cancelled, or another opponent: ``extend`` reports it) is a record of the card run, not a bout heldevents each event holds a boutClasses
IdentityError
Bases: AssertionError
The registry breaks an invariant (the message lists every breach).
Functions
check
check(identity: Identity) -> NoneRaise IdentityError on any breach of the module doc’s invariants.