Skip to content

Commit 2c8bfe5

Browse files
authored
Run mypy with tox (jpadilla#421)
1 parent 2f31a58 commit 2c8bfe5

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,16 @@ matrix:
66
- python: 3.4
77
env: TOXENV=flake8,py34-crypto,py34-nocrypto
88
- python: 3.5
9-
env: TOXENV=flake8,py35-crypto,py35-nocrypto,py35-contrib_crypto
9+
env: TOXENV=flake8,mypy,py35-crypto,py35-nocrypto,py35-contrib_crypto
1010
- python: 3.6
11-
env: TOXENV=flake8,py36-crypto,py36-nocrypto,py36-contrib_crypto
11+
env: TOXENV=flake8,mypy,py36-crypto,py36-nocrypto,py36-contrib_crypto
1212
- python: 3.7
13-
env: TOXENV=flake8,py37-crypto,py37-nocrypto,py37-contrib_crypto
13+
env: TOXENV=flake8,mypy,py37-crypto,py37-nocrypto,py37-contrib_crypto
1414
dist: xenial
15-
before_install:
16-
- sudo apt-get install python3-pip # required to install mypy
1715
install:
1816
- pip install -U pip
1917
- pip install -U tox coveralls
20-
- sudo python3 -m pip install -U mypy # python3.4+ required to run mypy
2118
script:
2219
- tox
23-
- mypy --ignore-missing-imports jwt
2420
after_success:
2521
- coveralls

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def get_version(package):
7777
'flake8',
7878
'flake8-import-order',
7979
'pep8-naming'
80+
],
81+
mypy=[
82+
'mypy'
8083
]
8184
),
8285
entry_points={

tox.ini

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{27,34,35,36,37}-crypto, py{27,35,36,37}-contrib_crypto, py{27,35,36,37}-nocrypto, flake8
2+
envlist = py{27,34,35,36,37}-crypto, py{27,35,36,37}-contrib_crypto, py{27,35,36,37}-nocrypto, flake8, mypy
33

44
[testenv]
55
commands =
@@ -14,3 +14,8 @@ extras = test
1414
commands =
1515
flake8
1616
extras = flake8
17+
18+
[testenv:mypy]
19+
commands =
20+
mypy --ignore-missing-imports jwt
21+
extras = mypy

0 commit comments

Comments
 (0)