Hi,
consider this snippet:
import torch as to

def test_div() -> None:
    a: to.Tensor = to.arange(3)
    a.div_(2)
    assert to.equal(a, to.LongTensor([0, 0, 1]))

if __name__ == "__main__":
    test_div()

This snippet, which runs correctly, produces two mypy errors:
$ mypy  test.py
test.py:5: error: "Tensor" has no attribute "div_"
test.py:6: error: Too many arguments for "LongTensor"
Found 2 errors in 1 file (checked 1 source file)

The one way I found to suppress these errors is to pass --no-site-packages --ignore-missing-imports to the mypy invocation, but that has other side-effects that are not ideal.
Should type hints maybe be packaged separately until they are stable? How do people typically set up their projects to avoid these false positives?
Cheers,
Enrico