This task is part of a bigger effort to migrate Pytorch from Mypy to Pyre. The goal of this task for you is to gain comfort with the Python type system and the types of errors Pyre gives. Future Pysa project work and debugging builds on this foundation.
torch/_C/__init__.pyi:1665:40 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
torch/_C/__init__.pyi:1667:37 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
torch/_C/__init__.pyi:1668:63 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
torch/_C/__init__.pyi:1669:59 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
torch/_C/__init__.pyi:1673:39 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
torch/_C/__init__.pyi:1675:36 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
torch/_C/__init__.pyi:1678:40 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
torch/_C/__init__.pyi:1680:37 Incompatible variable type [9]: dtype is declared to have type `dtype` but is used as type `None`.
Submitting a PR
We use the following linters internally, so to save everyone's time, please make sure you run the following linters locally and fix errors related to the files you modified before submitting a PR:
black && usort format . && flake8
To install the linters, you can run the following command:
This task is part of a bigger effort to migrate Pytorch from Mypy to Pyre. The goal of this task for you is to gain comfort with the Python type system and the types of errors Pyre gives. Future Pysa project work and debugging builds on this foundation.
Development Environment Setup
Task Description
Fix the Pyre type checking errors in
torch/_C/__init__.pyi
:Submitting a PR
We use the following linters internally, so to save everyone's time, please make sure you run the following linters locally and fix errors related to the files you modified before submitting a PR:
To install the linters, you can run the following command: