torchcell.provenance.ContractSpec
- class ContractSpec(bases: tuple[str, ...], fields: tuple[tuple[str, FieldSpec], ...], assigns: tuple[tuple[str, str], ...], methods: tuple[tuple[str, str], ...], config: str | None)[source]
Bases:
objectThe contract-relevant surface of one schema class.
Two classes with equal
ContractSpecserialize/validate identically as far as this static analysis can tell, and get the same fingerprint. Docstrings, plain (non-validator) methods, comments, field descriptions and field ORDER are excluded by construction.