Repository navigation
Type default parameters with overloads - #8573
Merged
Jens Hedegaard Nielsen (jenshnielsen) merged 1 commit intoDec 3, 2026
Merged
Jens Hedegaard Nielsen (jenshnielsen) merged 1 commit into
Jens Hedegaard Nielsen (jenshnielsen) merged 1 commit into
Conversation
Jens Hedegaard Nielsen (jenshnielsen)
requested a review
from a team
as a code owner
October 8, 2026 06:43
Jens Hedegaard Nielsen (jenshnielsen)
force-pushed
the
fix/add-parameter-overloads
branch
from
October 8, 2026 06:47
96a19f8 to
418bb60
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8573 +/- ##
=======================================
Coverage 78.54% 78.55%
=======================================
Files 311 311
Lines 33159 33162 +3
=======================================
+ Hits 26046 26049 +3
Misses 7113 7113 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Jens Hedegaard Nielsen (jenshnielsen)
force-pushed
the
fix/add-parameter-overloads
branch
from
October 8, 2026 09:31
991217f to
43c1926
Compare
Jens Hedegaard Nielsen (jenshnielsen)
force-pushed
the
fix/add-parameter-overloads
branch
3 times, most recently
from
December 3, 2026 08:44
765cdbd to
36cb859
Compare
Model the default Parameter return of add_parameter separately from an explicitly supplied parameter subclass, eliminating the generic cast. The default overload returns Parameter[Any, Any] so that it can be assigned to more specifically annotated parameters such as Parameter[float, Self]. Deprecate the now unused TParameter TypeVar using the same module level __getattr__ pattern used for previously removed TypeVars. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Jens Hedegaard Nielsen (jenshnielsen)
force-pushed
the
fix/add-parameter-overloads
branch
from
December 3, 2026 08:55
36cb859 to
c03429b
Compare
Cina Arjmand (CinaArjmand)
approved these changes
Dec 3, 2026
Jens Hedegaard Nielsen (jenshnielsen)
deleted the
fix/add-parameter-overloads
branch
December 3, 2026 13:46
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.
Model the default Parameter return separately from explicitly supplied parameter subclasses, eliminating the generic cast while retaining precise instrument typing.