basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

return only generics dropped from higher order function

Open KotlinIsland opened this issue 1 year ago • 0 comments

from typing import Callable, TypeVar

def asdf[T, **P](fn: Callable[P, T]) -> Callable[P, T]: ...

T = TypeVar("T")
foo: "() -> T"

reveal_type(asdf(foo)) # "() -> Never", should be "[T] () -> T"

KotlinIsland avatar Dec 06 '24 00:12 KotlinIsland