Describe the bug
Given a file like
from torch import bfloat16
Then:
me@computer $ uv tool run --with pyright==1.1.408 --with torch==2.8.0 --python 3.12 pyright client.py
0 errors, 0 warnings, 0 informations
me@computer $ uv tool run --with pyright==1.1.409 --with torch==2.8.0 --python 3.12 pyright client.py
/home/josh_cannon/client.py
/home/josh_cannon/client.py:1:19 - error: "bfloat16" is not exported from module "torch"
Import from "torch._C" instead (reportPrivateImportUsage)
I suspect this is due to #11375, but couldn't verify precisely.
This also may just be a bug in torch (e.g. torch should define a __init__.pyi with all the names in it, a subset of which are in _C/__init__.pyi)
Describe the bug
Given a file like
Then:
I suspect this is due to #11375, but couldn't verify precisely.
This also may just be a bug in
torch(e.g.torchshould define a__init__.pyiwith all the names in it, a subset of which are in_C/__init__.pyi)