Repository navigation
[ty] Share parameter-default inference between functions and lambdas - #29078
Open
charliermarsh wants to merge 1 commit into
Open
charliermarsh wants to merge 1 commit into
charliermarsh wants to merge 1 commit into
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 98.24%. The percentage of expected errors that received a diagnostic held steady at 98.24%. The number of fully passing files held steady at 134/146. |
Memory usage reportSummary
Significant changesClick to expand detailed breakdownprefect
sphinx
trio
flake8
|
|
charliermarsh
marked this pull request as draft
October 2, 2026 18:15
charliermarsh
force-pushed
the
charlie/fix-ty-4613
branch
from
October 2, 2026 18:41
c426722 to
d3c8bd1
Compare
charliermarsh
force-pushed
the
charlie/fix-ty-4613
branch
from
October 2, 2026 20:11
d3c8bd1 to
3d1cc96
Compare
charliermarsh
force-pushed
the
charlie/fix-ty-4613
branch
from
October 2, 2026 20:47
3d1cc96 to
a341cf4
Compare
charliermarsh
added this pull request to stack #29081
October 2, 2026 20:57
charliermarsh
force-pushed
the
charlie/fix-ty-4613
branch
from
October 2, 2026 21:03
a341cf4 to
71d4dd4
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
charliermarsh
force-pushed
the
charlie/fix-ty-4613
branch
from
October 2, 2026 21:21
71d4dd4 to
c080675
Compare
charliermarsh
marked this pull request as ready for review
October 2, 2026 21:24
charliermarsh
force-pushed
the
charlie/fix-ty-4613
branch
from
October 5, 2026 14:41
c080675 to
c916cdd
Compare
charliermarsh
force-pushed
the
charlie/fix-ty-4613
branch
from
October 7, 2026 02:00
c916cdd to
4c829ad
Compare
charliermarsh
had a problem deploying
to
automations
October 7, 2026 02:00 — with
GitHub Actions
Failure
This branch had an error being deployed
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
We already infer defaults for named functions separately from their annotations. Call checking only needs to know whether a parameter has a default, and evaluating its value while building the signature can re-enter the decorated function's own signature inference.
We now extend this separation to lambdas, using a shared inference region for each parameter default. Previously, reading a lambda default could infer its entire enclosing scope, causing recursive decorators to grow nested container types without converging.
Closes astral-sh/ty#4613.