[ty] Add Top[] and Bottom[] special forms, replacing top_materialization_of() function by JelleZijlstra · Pull Request #20054 · astral-sh/ruff (original) (raw)

@JelleZijlstra

@JelleZijlstra

@JelleZijlstra marked this pull request as ready for review

August 23, 2025 01:09

second-ed pushed a commit to second-ed/ruff that referenced this pull request

Sep 9, 2025

@JelleZijlstra @second-ed

…ion_of() function (astral-sh#20054)

Part of astral-sh/ty#994

Summary

Add new special forms to ty_extensions, Top[T] and Bottom[T]. Remove ty_extensions.top_materialization and ty_extensions.bottom_materialization.

Test Plan

Converted the existing materialization.md mdtest to the new syntax. Added some tests for invalid use of the new special form.

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

[ Show hidden characters]({{ revealButtonHref }})