-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
astral-sh/ruff
#22544Labels
callablesgenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation
Milestone
Description
Summary
from collections.abc import Callable
def fn[**P, T](value: Callable[P, T]) -> Callable[P, T]:
return value
@fn # errors go away when this decorator is removed
def foo[T](value: T) -> T:
return value
a: int = foo(1) # errorsObject of type `T@foo` is not assignable to `int` (invalid-assignment) [Ln 10, Col 10]
Argument is incorrect: Expected `T@foo`, found `Literal[1]` (invalid-argument-type) [Ln 10, Col 14]
Version
ty 0.0.8 (aa7559d 2025-12-29)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
callablesgenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation