https://pantsbuild.org/ logo
#general
Title
# general
p

plain-carpet-73994

11/14/2022, 7:11 PM
Is is possible to augment some existing type hint with my own? For example, pytorch comes with some type hints but it's missing some. So I created a
torch.pyi
file and added some type info for the
torch.load
method. I was hoping mypy would use the def of
torch.load
from my
.pyi
file and then fall back to the ones that ship with pytorch for everything else. But that doesn't appear to be the case: now it only pays attention to my .pyi file ignoring all else. Maybe this is more of a question for the mypy folks??
h

happy-kitchen-89482

11/14/2022, 7:12 PM
Yeah, I don’t really know, possibly more of a mypy question…
👍 1
5 Views