basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

generic bounds don't work with bare typevar

Open KotlinIsland opened this issue 3 years ago • 0 comments

from typing import TypeVar

T = TypeVar("T")
R = TypeVar("R", bound=T)


def foo(t: T, r: R): ...

o: object
f: float

foo(f, o)  # no error

KotlinIsland avatar Oct 18 '22 10:10 KotlinIsland