Files
pytorch/mypy-README.md
Richard Zou dcbbf346c2 Change output_declarations in function_wrapper.py to be a NamedTuple (#5312)
* Add python typing module as build dependency

* Change output_declarations to be a NamedTuple

* Add mypy configuration files

mypy-files.txt includes a list of all files that should be typed checked
with mypy. Run mypy with `mypy @mypyfiles.txt`.

mypy.ini includes mypy options. Unfortunately this can't be merged with
mypy-files.txt.

Update .travis.yml so that one doesn't have to specify what files to
type check inside it.

* Add RuntimeError on missing `typing` module

Alerts users to the new build dependency.
2018-02-23 13:33:59 -05:00

285 B

Optional type checking with mypy

mypy is an optional static typechecker that works with Python 3. To use it, install the following dependencies:

# Install dependencies
pip install mypy mypy-extensions

# Run type checker in the pytorch/ directory
mypy @mypy-files.txt