Fix #77: rename_arguments double-partial bug#78
Merged
hmgaudecker merged 3 commits intomainfrom Mar 13, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
+ Coverage 96.61% 96.70% +0.08%
==========================================
Files 26 26
Lines 1272 1306 +34
==========================================
+ Hits 1229 1263 +34
Misses 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hmgaudecker
commented
Mar 13, 2026
|
|
||
| ## 0.5.0 | ||
|
|
||
| - :gh:`77` Fix `decorator_rename_arguments` by calling `get_free_arguments` inside the |
timmens
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rename_argumentswrapping partial inputs in a secondfunctools.partial, which caused bound arguments to be passed twiceget_free_argumentsto filter the wrapper's signature to only truly free parameters, instead of re-implementing partial keyword detectionrename_argumentswithfunctools.partialinputsDetails
The old code had a "Preserve function type" block that wrapped the closure in
functools.partial(wrapper, *func.args, **func.keywords). This re-bound arguments that were already captured by the closure's call tofunc(...), causing double-passing.The fix removes that block and instead filters keyword-bound parameters out of the wrapper's signature using the existing
get_free_argumentshelper, keeping a single source of truth for which parameters are free.Test plan
Closes #77
🤖 Generated with Claude Code