https://pantsbuild.org/ logo
p

plain-carpet-73994

06/16/2021, 8:36 PM
I'm also wondering how to use pip installed type hints. For example, I can add
grpc-stubs
to my requirements but they're not automatically used. I tried adding
//:grpc-stubs
to the
dependencies
for the targets using grpc but that didn't do the trick either.
h

hundreds-father-404

06/16/2021, 8:54 PM
Hm, I'm surprised that didn't do the trick. We're working on adding a
stubs_mapping
mechanism to teach dependency inference about type stubs - but in the meantime, the workaround is to manually add deps on the stubs like you're doing One way you could debug is to do
--no-process-execution-local-cleanup
to inspect the chroot where MyPy is running. Then use
unzip
the MyPy runner PEX there and check if it has the type stubs
p

plain-carpet-73994

06/16/2021, 9:07 PM
Thanks!
4 Views