mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-24 13:59:49 +00:00
turn off some auto-formatting
This commit is contained in:
parent
2150c66e75
commit
7764a5ab35
1 changed files with 4 additions and 0 deletions
|
|
@ -19,6 +19,8 @@ bound of all of the types that satisfy the constraint set.
|
|||
from typing import Never
|
||||
from ty_extensions import ConstraintSet, generic_context
|
||||
|
||||
# fmt: off
|
||||
|
||||
def unbounded[T]():
|
||||
# revealed: ty_extensions.Specialization[T@unbounded = object]
|
||||
reveal_type(generic_context(unbounded).specialize_constrained(ConstraintSet.always()))
|
||||
|
|
@ -154,6 +156,8 @@ constraint that makes the test succeed.
|
|||
```py
|
||||
from typing import Any
|
||||
|
||||
# fmt: off
|
||||
|
||||
def constrained_by_gradual[T: (Base, Any)]():
|
||||
# revealed: ty_extensions.Specialization[T@constrained_by_gradual = object]
|
||||
reveal_type(generic_context(constrained_by_gradual).specialize_constrained(ConstraintSet.always()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue