Skip to content

diff: keep scanning after equal path-limited siblings#198

Open
gaoflow wants to merge 1 commit into
inveniosoftware:masterfrom
gaoflow:fix-path-limit-nested-add-188
Open

diff: keep scanning after equal path-limited siblings#198
gaoflow wants to merge 1 commit into
inveniosoftware:masterfrom
gaoflow:fix-path-limit-nested-add-188

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • continue scanning sibling keys when a path-limited value is equal instead of returning from the whole recursion frame
  • add a regression test for wildcard path limits preserving nested dictionary additions

Closes #188.

Validation

  • python -m pytest tests/test_dictdiffer.py::DictDifferTests::test_path_limit_addition -q -o addopts=''
  • python -m pytest tests/test_dictdiffer.py -q -o addopts=''
  • python -m pytest -q -o addopts=''
  • python -m compileall dictdiffer tests
  • git diff --check
  • python -m pycodestyle --ignore=E501,W504 dictdiffer/__init__.py tests/test_dictdiffer.py

Note: the repository default pytest addopts require optional pytest lint plugins that are not installed in this local environment, so the test commands above clear addopts for behavioral validation.

This pull request was prepared with the assistance of AI, under my direction and review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DictDiffer does not track additions of nested dictionaries.

1 participant