There are two deep_merge functions — one in config.py (private, returns a new dict) and one in config_merger.py (public, mutates in place). The merge logic is identical.
| File |
Signature |
Behavior |
commit_check/config.py:26 |
(base, override) -> dict |
Returns a new dict |
commit_check/config_merger.py:97 |
(base, override) -> None |
Modifies in-place |
We only need one implementation. The fix:
- Make
config.py:_deep_merge a thin wrapper that copies base, then delegates to config_merger.deep_merge.
- Delete the original function body (~7 lines).
config.py needs the copy because _deep_merge(parent, config) (line 128) is used for the inherit_from feature — you don't want to mutate the parent config. config_merger.py builds a single accumulator dict layer by layer (defaults → toml → env → cli), so in-place is fine. The wrapper preserves both, drops the duplicate.
Required change:
commit_check/config.py — replace _deep_merge body with a delegation wrapper
There are two
deep_mergefunctions — one inconfig.py(private, returns a new dict) and one inconfig_merger.py(public, mutates in place). The merge logic is identical.commit_check/config.py:26(base, override) -> dictcommit_check/config_merger.py:97(base, override) -> NoneWe only need one implementation. The fix:
config.py:_deep_mergea thin wrapper that copiesbase, then delegates toconfig_merger.deep_merge.config.pyneeds the copy because_deep_merge(parent, config)(line 128) is used for theinherit_fromfeature — you don't want to mutate the parent config.config_merger.pybuilds a single accumulator dict layer by layer (defaults → toml → env → cli), so in-place is fine. The wrapper preserves both, drops the duplicate.Required change:
commit_check/config.py— replace_deep_mergebody with a delegation wrapper