Skip to content

Forward keywords through over_args - #450

Merged
dgilland merged 1 commit into
dgilland:developfrom
Gambit-Checkmate:fix/over-args-keyword-forwarding
Nov 11, 2026
Merged

dgilland merged 1 commit into
dgilland:developfrom
Gambit-Checkmate:fix/over-args-keyword-forwarding

Conversation

@Gambit-Checkmate

Copy link
Copy Markdown
Contributor

Fixes #449.

Forward keyword arguments from over_args to the wrapped function. Transforms apply to the corresponding positional arguments. The wrapper's receiver is positional-only so a keyword named self can reach the target.

Use Concatenate to describe the transformed positional prefix and preserve the remaining parameters in the callable type. The chain annotations are regenerated from those overloads.

  • Two runtime regressions fail on 1cf4661 and pass with the patch. They cover a required keyword-only parameter and a keyword named self.
  • Six focused mypy/runtime test items pass, covering direct and chained calls, the remaining positional and keyword-only parameters, and the existing transform arities.
  • Windows CPython 3.13.13 full runtime unit and doctest suite: 3,314 passed, 100% coverage. The configured mypy, Ruff, Sphinx, package builds and diff checks passed. A Linux Python 3.10.12 smoke test passed.

OpenAI Codex assisted with the investigation, implementation and tests.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — Gambit-Checkmate:fix/over-args-keyword-forwarding into dgilland:develop

@dgilland
dgilland merged commit 3787835 into dgilland:develop Nov 11, 2026
12 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.

over_args rejects keyword arguments required by the wrapped function

3 participants