Skip to content

Commit dcbbf34

Browse files
zou3519soumith
authored andcommitted
Change output_declarations in function_wrapper.py to be a NamedTuple (pytorch#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.
1 parent 2130070 commit dcbbf34

File tree

8 files changed

+225
-183
lines changed

8 files changed

+225
-183
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ matrix:
1616
python: "2.7"
1717
install: pip install flake8
1818
script: flake8
19-
# mypy will complain about various files. Limiting it to only typed files
2019
- env: MYPY_TYPE_CHECK
2120
python: "3.6"
2221
install: pip install mypy mypy-extensions
23-
script: mypy --py2 aten/src/ATen/function_wrapper.py
22+
script: mypy @mypy-files.txt

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ On Linux
171171
export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" # [anaconda root directory]
172172

173173
# Install basic dependencies
174-
conda install numpy pyyaml mkl setuptools cmake cffi
174+
conda install numpy pyyaml mkl setuptools cmake cffi typing
175175

176176
# Add LAPACK support for the GPU
177177
conda install -c pytorch magma-cuda80 # or magma-cuda90 if CUDA 9

0 commit comments

Comments
 (0)