Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Document all special forms in ty_extensions#26263

Merged
AlexWaygood merged 3 commits into
mainfrom
alex/ty-extensions-docs
Jun 23, 2026
Merged

[ty] Document all special forms in ty_extensions#26263
AlexWaygood merged 3 commits into
mainfrom
alex/ty-extensions-docs

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

As per the title

Test Plan

demo when hovering over AlwaysTruthy in an inlay hint in the playground:

image

@AlexWaygood AlexWaygood added server Related to the LSP server ty Multi-file analysis & type inference labels Jun 23, 2026
Comment on lines +207 to +218
) -> ConstraintSet:
"""
Returns a constraint set that requires `typevar` to specialize to a type
that is a supertype of `lower_bound` and a subtype of `upper_bound`.
"""

@staticmethod
def always() -> Self:
def always() -> ConstraintSet:
"""Returns a constraint set that is always satisfied"""

@staticmethod
def never() -> Self:
def never() -> ConstraintSet:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes are unrelated, but I noticed that ty was unhappy with me when I opened up this file in VSCode, because it's invalid to return Self from a staticmethod (very naughty of you @dcreager!)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is? I didn't realize that!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is! Charlie added validation for it relatively recently

@AlexWaygood AlexWaygood marked this pull request as ready for review June 23, 2026 12:59
@AlexWaygood AlexWaygood requested a review from a team as a code owner June 23, 2026 12:59
@astral-sh-bot

astral-sh-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 94.37%. The percentage of expected errors that received a diagnostic held steady at 89.00%. The number of fully passing files held steady at 94/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Memory usage report

Summary

Project Old New Diff Outcome
sphinx 193.24MB 193.25MB +0.01% (12.78kB)
prefect 516.11MB 516.11MB +0.00% (2.67kB)
trio 77.49MB 77.49MB -0.00% (1.30kB) ⬇️
flake8 30.74MB 30.74MB -0.01% (3.05kB) ⬇️

Significant changes

Click to expand detailed breakdown

sphinx

Name Old New Diff Outcome
parsed_module 18.36MB 18.37MB +0.07% (12.78kB)

prefect

Name Old New Diff Outcome
parsed_module 19.35MB 19.35MB +0.01% (2.67kB)

trio

Name Old New Diff Outcome
parsed_module 15.04MB 15.04MB -0.01% (1.30kB) ⬇️

flake8

Name Old New Diff Outcome
parsed_module 9.77MB 9.77MB -0.03% (3.05kB) ⬇️

@astral-sh-bot

astral-sh-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@AlexWaygood AlexWaygood requested a review from sharkdp June 23, 2026 13:36

@sharkdp sharkdp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment thread crates/ty_vendored/ty_extensions/ty_extensions.pyi Outdated
Comment thread crates/ty_vendored/ty_extensions/ty_extensions.pyi Outdated
Comment thread crates/ty_vendored/ty_extensions/ty_extensions.pyi Outdated
Comment thread crates/ty_vendored/ty_extensions/ty_extensions.pyi Outdated
Comment thread crates/ty_vendored/ty_extensions/ty_extensions.pyi Outdated
@AlexWaygood AlexWaygood enabled auto-merge (squash) June 23, 2026 14:49
@AlexWaygood AlexWaygood merged commit 8ab9c8b into main Jun 23, 2026
60 checks passed
@AlexWaygood AlexWaygood deleted the alex/ty-extensions-docs branch June 23, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Related to the LSP server ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants