Repository navigation
param_default: treat i2 placeholder defaults (methodize default_from) as no default - #50
Merged
Merged
Conversation
Use i2.is_placeholder_default (NotSet or any i2.DefaultPlaceholder, e.g. the marker methodize(..., default_from=...) puts in a signature), falling back to is_not_set / NotSet for older i2. Closes #49. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thorwhalen
added a commit
that referenced
this pull request
Oct 20, 2026
__init__ updated self.__annotations__ in place, which is the class's dict once it exists (always, on 3.10), so every instance's annotations leaked into later ones. Master CI (3.10) failed on the ParamsSpecifier doctest after #50's test ran from_func on another function first. Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Closes #49.
param_defaultnow usesi2.is_placeholder_default(NotSet or anyi2.DefaultPlaceholder, such as theInstanceAttrDefaultmarkermethodize(..., default_from=...)puts in a signature), with fallbacks tois_not_setand to the bareNotSetcheck for older i2. Both callers (mk_input_schema_from_func,ParamsSpecifier.from_func) go through it.New test feeds a methodized function through the input schema and
ParamsSpecifier(skipped on i2 withoutDefaultPlaceholder); it fails without the change.🤖 Generated with Claude Code