Skip to content

Commit

Permalink
Initial type hints for function_wrapper (pytorch#4947)
Browse files Browse the repository at this point in the history
* Initial type hints for function_wrapper

* Don't break python 2

* Update TopEnvironment

* Add mypy check to travis

* Add .mypy_cache to .gitignore
  • Loading branch information
zou3519 authored and ezyang committed Feb 8, 2018
1 parent 696db00 commit 0629785
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ test/.coverage
*/**/*.dylib*
test/data/legacy_serialized.pt
test/data/linear.pt
.mypy_cache

# IPython notebook checkpoints
.ipynb_checkpoints
Expand Down
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ sudo: false
matrix:
fast_finish: true
include:
env: LINT_CHECK
- env: LINT_CHECK
python: "2.7"
install: pip install flake8
script: flake8
# mypy will complain about various files. Limiting it to only typed files
- env: MYPY_TYPE_CHECK
python: "3.6"
install: pip install mypy mypy-extensions
script: mypy --py2 aten/src/ATen/function_wrapper.py
Loading

0 comments on commit 0629785

Please sign in to comment.