Repository navigation
Support nested merge_keys strategies via dotted paths - #55
Merged
Merged
Conversation
comprehensive_merge previously recursed into nested dicts unconditionally, ignoring the composition's merge_keys strategy below the top level. A dotted key path (e.g. "requirements.dev") in merge_keys now selects its own merge strategy for that nested key while the rest of the structure still merges comprehensively. Also set interrogate's ignore-overloaded-functions, since it and ruff's overload-with-docstring rule otherwise contradict each other on the freeze_data overload stubs in the touched file. Co-authored-by: Claude <noreply@anthropic.com>
Completes the fix in the previous commit: update_context now passes merge_keys through to comprehensive_merge so top-level context updates honor nested-key strategies, docs/schema description explain the dotted path syntax, and tests cover both comprehensive_merge and update_context. Co-authored-by: Claude <noreply@anthropic.com>
Contributor
|
Contributor
|
Version hint: patch Comment ID: Display version hint-auto-generated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
comprehensive_mergerecursed into nested dicts unconditionally, so a composition'smerge_keyshad no effect below the top level.requirements.dev: update) inmerge_keys; everything else still merges comprehensively.Composition.merge_keysfield description to explain the dotted-path syntax.interrogate/ruffconfig conflict onfreeze_data's@overloadstubs that was blocking commits touching that file.Fixes #45
Test plan
uv run pytest(336 passed; unrelatedtest_git_commands.pyfailures pre-date this change, reproduced onmaster)uv run ruff check/ruff format --checkpre-commit run --all-filesequivalent hooks passed on both commits (mypy, interrogate, pydoclint, etc.)test_data_merge.pyandtest_context.py