Skip to content

Commit

Permalink
Run mypy with tox (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpadilla committed May 5, 2019
1 parent 2f31a58 commit 2c8bfe5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ matrix:
- python: 3.4
env: TOXENV=flake8,py34-crypto,py34-nocrypto
- python: 3.5
env: TOXENV=flake8,py35-crypto,py35-nocrypto,py35-contrib_crypto
env: TOXENV=flake8,mypy,py35-crypto,py35-nocrypto,py35-contrib_crypto
- python: 3.6
env: TOXENV=flake8,py36-crypto,py36-nocrypto,py36-contrib_crypto
env: TOXENV=flake8,mypy,py36-crypto,py36-nocrypto,py36-contrib_crypto
- python: 3.7
env: TOXENV=flake8,py37-crypto,py37-nocrypto,py37-contrib_crypto
env: TOXENV=flake8,mypy,py37-crypto,py37-nocrypto,py37-contrib_crypto
dist: xenial
before_install:
- sudo apt-get install python3-pip # required to install mypy
install:
- pip install -U pip
- pip install -U tox coveralls
- sudo python3 -m pip install -U mypy # python3.4+ required to run mypy
script:
- tox
- mypy --ignore-missing-imports jwt
after_success:
- coveralls
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def get_version(package):
'flake8',
'flake8-import-order',
'pep8-naming'
],
mypy=[
'mypy'
]
),
entry_points={
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,34,35,36,37}-crypto, py{27,35,36,37}-contrib_crypto, py{27,35,36,37}-nocrypto, flake8
envlist = py{27,34,35,36,37}-crypto, py{27,35,36,37}-contrib_crypto, py{27,35,36,37}-nocrypto, flake8, mypy

[testenv]
commands =
Expand All @@ -14,3 +14,8 @@ extras = test
commands =
flake8
extras = flake8

[testenv:mypy]
commands =
mypy --ignore-missing-imports jwt
extras = mypy

0 comments on commit 2c8bfe5

Please sign in to comment.