Skip to content

Reject unreachable partial varargs after keyword binding - #2537

Merged
sobolevn merged 3 commits into
dry-python:masterfrom
xiehuanyi:issue-2191-variadic-20261012-r2
Oct 13, 2026
Merged

sobolevn merged 3 commits into
dry-python:masterfrom
xiehuanyi:issue-2191-variadic-20261012-r2

Conversation

@xiehuanyi

Copy link
Copy Markdown
Contributor

partial(f, first=1) still advertises *args when f has variadic positional parameters, even though a positional call raises TypeError for the duplicate first argument. Remove that unreachable variadic parameter while preserving the positional prefix and legal keyword-only arguments. This completes the variadic case of #2191 after #2446.

Validation: 69 curry type cases pass, including four new regressions/controls. The complete runtime and documentation suite passes (1112 passed, four expected failures, 100% coverage). Full Ruff lint/format, Flake8, Mypy, slots checks and package compatibility pass on Python 3.15.

  • No unrelated changes
  • Regression type tests added
  • Changelog updated

Prepared with OpenAI Codex (GPT-6.1 Sol, xhigh), including this description.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 18:53

Copilot AI left a comment

Copy link
Copy Markdown

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.

@codspeed

codspeed Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

ℹ️ 2 benchmarks have no flame graph

The flamegraph could not be generated because we failed to resolve the symbols in the profiling trace. This happens when we fail to harvest information about language frames.

✅ 22 untouched benchmarks


Comparing xiehuanyi:issue-2191-variadic-20261012-r2 (166d0b7) with master (6313ed7)

Open in CodSpeed

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (82ef3ef) to head (166d0b7).
⚠️ Report is 633 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #2537    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           80        82     +2     
  Lines         2485      2692   +207     
  Branches       437        44   -393     
==========================================
+ Hits          2485      2692   +207     

☔ 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.

Comment thread typesafety/test_curry/test_partial/test_partial_arguments.yml Outdated
Comment thread CHANGELOG.md Outdated
Comment thread typesafety/test_curry/test_partial/test_partial_arguments.yml Outdated
Comment thread typesafety/test_curry/test_partial/test_partial_arguments.yml Outdated
@sobolevn
sobolevn merged commit f232e07 into dry-python:master Oct 13, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants