aeat.domain.calculations.registry._toml_helpers module¶
Shared TOML-table narrowing helper for the registry loader family.
Extracted so both _loader and
_loader_locales can narrow a parsed
TOML value to a string-keyed table without importing each other (avoiding a
runtime import cycle between the compiler and the locale-merge submodule).
- as_toml_table(value)[source]¶
Narrow a parsed TOML value to a string-keyed table, or
None.tomllibandfreeze_toml()always emitstrkeys, so a parsed-TOMLdictis genuinelydict[str, object]. The runtimeisinstancecheck loses the key type because TOML payloads flow throughobject; the annotation below re-attaches the knownstrkey type at this single TOML deserialization boundary.