enable type checking for torch._classes (#44576)

Summary:
Fix https://github.com/pytorch/pytorch/issues/42980

Pull Request resolved: https://github.com/pytorch/pytorch/pull/44576

Reviewed By: malfet

Differential Revision: D23668741

Pulled By: walterddr

fbshipit-source-id: 4201ea3187a40051ebff53d28c8e571ea1a61126
This commit is contained in:
Rong Rong 2020-09-14 13:21:39 -07:00 committed by Facebook GitHub Bot
parent ad7a2eb1c9
commit ecac8294a6
2 changed files with 3 additions and 3 deletions

View File

@ -84,9 +84,6 @@ ignore_errors = True
[mypy-torch.distributions.*]
ignore_errors = True
[mypy-torch._classes]
ignore_errors = True
[mypy-torch.tensor]
ignore_errors = True

View File

@ -411,6 +411,9 @@ class PyTorchFileWriter(object):
def write_end_of_file(self) -> None: ...
...
# Defined in torch/csrc/jit/python/python_custome_class.cpp
def _get_custom_class_python_wrapper(name: str, attr: str) -> Any: ...
# Defined in torch/csrc/Generator.cpp
class Generator(object):
device: _device