Skip to content

Support empty and keyword updates in BaseDict - #633

Merged
fabiocaccamo merged 2 commits into
fabiocaccamo:mainfrom
xiehuanyi:fix/base-dict-update-keywords-20261013
Oct 20, 2026
Merged

fabiocaccamo merged 2 commits into
fabiocaccamo:mainfrom
xiehuanyi:fix/base-dict-update-keywords-20261013

Conversation

@xiehuanyi

Copy link
Copy Markdown
Contributor

BaseDict.update() rejects empty calls and entry keywords such as update(name="Alice"), although its dictionary base class supports these forms.

Make the source optional, use positional-only self and other parameters, and forward entry keywords to the backing dictionary or native storage. Preserve keyword precedence, nested BaseDict normalization, and freeze checks. Five tests cover both storage modes and native-dict controls for self/other keys.

Fourteen new subcases fail before this change. All 968 unittest cases, package mypy checks, Ruff lint and formatting pass.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 18:47

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 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.69%. Comparing base (c4c8a58) to head (cbf17da).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #633   +/-   ##
=======================================
  Coverage   98.69%   98.69%           
=======================================
  Files          65       65           
  Lines        2446     2449    +3     
=======================================
+ Hits         2414     2417    +3     
  Misses         32       32           
Flag Coverage Δ
unittests 98.69% <100.00%> (+<0.01%) ⬆️

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 b3aa7ba into fabiocaccamo:main Oct 20, 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