Closed
Description
from functools import partial
from typing import TypeVar
T = TypeVar("T")
def f(x: int) -> int: ...
pf = partial(f)
def g(x: T) -> T: ...
pg = partial(g)
reveal_type(f(1))
reveal_type(pf(1))
reveal_type(g(1))
reveal_type(pg(1))
Python 3.8.1, mypy 0.770+dev.be883f6770b24bc467ccb993fd77864248b61979 output:
note: Revealed type is 'builtins.int'
note: Revealed type is 'builtins.int*'
note: Revealed type is 'builtins.int*'
note: Revealed type is 'T`-1'
Expected output: int in all cases
Metadata
Metadata
Assignees
Labels
No labels