Skip to content

Include tuple indexes in keypath discovery and matching - #620

Merged
fabiocaccamo merged 1 commit into
fabiocaccamo:mainfrom
xiehuanyi:fix/benedict-tuple-keypaths
Oct 11, 2026
Merged

fabiocaccamo merged 1 commit into
fabiocaccamo:mainfrom
xiehuanyi:fix/benedict-tuple-keypaths

Conversation

@xiehuanyi

Copy link
Copy Markdown
Contributor

Indexed keypath discovery skips tuples, although direct indexed reads and flattening already support them. As a result, benedict({"items": ({"value": 1},)}).match("items[*].value") returns an empty list even though d["items[0].value"] returns 1.

Traverse tuples alongside lists when indexes are enabled. Add regressions for tuple mappings, nested tuples and lists, wildcard matching, and the indexes-disabled behavior.

Validation: both new regressions fail on unchanged main. The full unittest suite passes after the fix (928 tests, 1 skipped); Ruff lint/format and mypy (64 source files) pass.

Copilot AI balanced review requested due to automatic review settings October 10, 2026 11:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (8c3371f) to head (6637869).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #620   +/-   ##
=======================================
  Coverage   98.51%   98.51%           
=======================================
  Files          64       64           
  Lines        2430     2430           
=======================================
  Hits         2394     2394           
  Misses         36       36           
Flag Coverage Δ
unittests 98.51% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fabiocaccamo
fabiocaccamo merged commit 796189e into fabiocaccamo:main Oct 11, 2026
18 checks passed
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.

3 participants