Skip to content

Compute callback parameter counts from the underlying function - #64

Merged
trissim merged 4 commits into
mainfrom
fix/callback-binding-arity-20261004
Oct 5, 2026
Merged

trissim merged 4 commits into
mainfrom
fix/callback-binding-arity-20261004

Conversation

@trissim

@trissim trissim commented Oct 5, 2026 •

Copy link
Copy Markdown

count_parameters now checks for bound methods with MethodType and subtracts one from the count of the underlying function, and the partial case calls itself instead of the private counter. Setting the cached count on an object that does not allow attributes no longer raises AttributeError. A new test checks the count is right whether the bound or unbound method is counted first.

@trissim
trissim marked this pull request as ready for review October 5, 2026 05:41
Copilot AI balanced review requested due to automatic review settings October 5, 2026 05:41

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.

@trissim
trissim merged commit fc17c5f into main Oct 5, 2026
3 of 22 checks passed
@trissim trissim changed the title Derive callback binding from original function arity Compute callback parameter counts from the underlying function Oct 11, 2026
@trissim
trissim deleted the fix/callback-binding-arity-20261004 branch October 11, 2026 20:05
trissim added a commit that referenced this pull request Oct 18, 2026
P553 #64: class-owned paint-only measurement contract
trissim added a commit that referenced this pull request Oct 18, 2026
P558 #64: include every DOM parent default CSS in MRO order
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.

2 participants