Skip to content

[ty] Propagate type context through await expressions#24256

Merged
ibraheemdev merged 1 commit intomainfrom
ibraheem/await-tcx
Mar 27, 2026
Merged

[ty] Propagate type context through await expressions#24256
ibraheemdev merged 1 commit intomainfrom
ibraheem/await-tcx

Conversation

@ibraheemdev
Copy link
Copy Markdown
Member

Resolves astral-sh/ty#3158.

@ibraheemdev ibraheemdev added the ty Multi-file analysis & type inference label Mar 27, 2026
@ibraheemdev ibraheemdev requested a review from dcreager as a code owner March 27, 2026 20:36
@astral-sh-bot astral-sh-bot bot requested a review from oconnor663 March 27, 2026 20:36
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 27, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 86.59%. The percentage of expected errors that received a diagnostic held steady at 80.96%. The number of fully passing files held steady at 68/132.

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 27, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 715.39MB 715.67MB +0.04% (283.85kB)
trio 117.73MB 117.78MB +0.04% (47.60kB)
flake8 48.04MB 48.04MB -
sphinx 264.89MB 264.89MB -

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
infer_scope_types_impl 54.06MB 54.11MB +0.08% (46.77kB)
infer_expression_types_impl 61.70MB 61.73MB +0.06% (35.39kB)
infer_definition_types 88.67MB 88.69MB +0.03% (23.12kB)
StaticClassLiteral<'db>::try_mro_ 5.85MB 5.87MB +0.38% (22.74kB)
FunctionType 8.68MB 8.69MB +0.15% (13.30kB)
infer_expression_type_impl 13.79MB 13.80MB +0.09% (13.24kB)
Specialization 2.48MB 2.50MB +0.48% (12.27kB)
Type<'db>::apply_specialization_ 3.58MB 3.59MB +0.31% (11.39kB)
cached_protocol_interface 402.12kB 413.43kB +2.81% (11.31kB)
CallableType 2.08MB 2.09MB +0.47% (9.91kB)
Type<'db>::member_lookup_with_policy_ 16.18MB 16.19MB +0.06% (9.87kB)
Type<'db>::class_member_with_policy_ 17.72MB 17.72MB +0.04% (8.02kB)
Type<'db>::apply_specialization_::interned_arguments 2.88MB 2.88MB +0.26% (7.73kB)
GenericAlias 1.15MB 1.15MB +0.62% (7.31kB)
FunctionType<'db>::signature_ 3.98MB 3.99MB +0.18% (7.23kB)
... 25 more

trio

Name Old New Diff Outcome
infer_expression_types_impl 7.07MB 7.08MB +0.11% (7.65kB)
infer_scope_types_impl 4.78MB 4.79MB +0.14% (6.75kB)
FunctionType 1.48MB 1.48MB +0.21% (3.23kB)
Type<'db>::apply_specialization_ 727.21kB 730.12kB +0.40% (2.91kB)
cached_protocol_interface 126.61kB 129.32kB +2.14% (2.71kB)
StaticClassLiteral<'db>::try_mro_ 822.86kB 825.29kB +0.30% (2.43kB)
CallableType 580.03kB 582.28kB +0.39% (2.25kB)
Specialization 460.81kB 462.88kB +0.45% (2.06kB)
Type<'db>::apply_specialization_::interned_arguments 639.77kB 641.80kB +0.32% (2.03kB)
FunctionType<'db>::signature_ 1.06MB 1.07MB +0.16% (1.76kB)
Type<'db>::class_member_with_policy_ 2.00MB 2.00MB +0.08% (1.61kB)
Type<'db>::try_call_dunder_get_ 1.37MB 1.37MB +0.11% (1.50kB)
ProtocolInterface 71.27kB 72.65kB +1.94% (1.38kB)
Type<'db>::member_lookup_with_policy_ 1.81MB 1.81MB +0.07% (1.31kB)
infer_definition_types 7.50MB 7.50MB +0.02% (1.23kB)
... 18 more

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 27, 2026

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@ibraheemdev ibraheemdev merged commit 30e8e1c into main Mar 27, 2026
49 checks passed
@ibraheemdev ibraheemdev deleted the ibraheem/await-tcx branch March 27, 2026 20:57
carljm added a commit that referenced this pull request Mar 31, 2026
* main: (40 commits)
  [ty] resolve union-likes in emitting union attribute errors (#24263)
  [ty] Improve support for `Callable` type context (#23888)
  [ty] Propagate type context through `await` expressions (#24256)
  [`pyflakes`] Flag annotated variable redeclarations as `F811` in preview mode (#24244)
  [ty] Preserve `Divergent` when materializing recursive aliases (#24245)
  Fix W391 fixes for consecutive empty notebook cells (#24236)
  [flake8-bugbear] Clarify RUF071 fix safety for non-path string comparisons (#24149)
  [ty] Ban type qualifiers in PEP-695 type aliases (#24242)
  [ty] Include keyword-prefixed symbols in completions for attributes (#24232)
  [ty] Add tests for TypedDict method overloads on unions (#24230)
  [ty] report unused bindings as unnecessary hint diagnostics (#23305)
  Remove unused `non_root` variable (#24238)
  Extend F507 to flag %-format strings with zero placeholders (#24215)
  [`flake8-simplify`] Suppress `SIM105` for `except*` before Python 3.12 (#23869)
  Ignore pre-initialization references in SIM113 (#24235)
  Parenthesize expression in RUF050 fix (#24234)
  Publish playgrounds using the `release-playground` environment (#24223)
  [ty] Fix instance-attribute lookup in methods of protocol classes (#24213)
  [ty] Used shared expression cache during generic call inference (#24219)
  [ty] make `Type::BoundMethod` include instances of same-named methods bound to a subclass (#24039)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

propagate type context through await

4 participants