Config.load_config validates the YAML against RedactDumpConfig and then throws the model away, returning the raw dict (redactdump/core/config.py:117). As a result the codebase is full of stringly-typed access and manual defaulting:
if "limits" not in self.config or "max_rows_per_table" not in self.config["limits"]:
Proposal: return the validated model and pass it around. Defaults move onto the model fields (killing the default-injection block in load_config), typos in config access become type errors, and ty can actually check the call sites.
Internal refactor, no behavior change.
Config.load_configvalidates the YAML againstRedactDumpConfigand then throws the model away, returning the raw dict (redactdump/core/config.py:117). As a result the codebase is full of stringly-typed access and manual defaulting:Proposal: return the validated model and pass it around. Defaults move onto the model fields (killing the default-injection block in
load_config), typos in config access become type errors, andtycan actually check the call sites.Internal refactor, no behavior change.