Add mypy CI job

This commit is contained in:
Nikolaus Waxweiler 2020-09-16 15:13:50 +01:00
parent 863d9fd3c8
commit 7a5138d91b
4 changed files with 33 additions and 1 deletions

View File

@ -18,6 +18,9 @@ branches:
matrix: matrix:
fast_finish: true fast_finish: true
include: include:
- python: 3.6
env:
- TOXENV=mypy
- python: 3.6 - python: 3.6
env: env:
- TOXENV=py36-cov,package_readme - TOXENV=py36-cov,package_readme

View File

@ -2,3 +2,4 @@ pytest>=3.0
tox>=2.5 tox>=2.5
bump2version>=0.5.6 bump2version>=0.5.6
sphinx>=1.5.5 sphinx>=1.5.5
mypy

21
mypy.ini Normal file
View File

@ -0,0 +1,21 @@
[mypy]
python_version = 3.6
files = Lib/fontTools/misc/plistlib
follow_imports = silent
ignore_missing_imports = True
warn_redundant_casts = True
warn_unused_configs = True
warn_unused_ignores = True
[mypy-fontTools.misc.plistlib]
check_untyped_defs = True
disallow_any_generics = True
disallow_incomplete_defs = True
disallow_subclassing_any = True
disallow_untyped_decorators = True
disallow_untyped_calls = False
disallow_untyped_defs = True
no_implicit_optional = True
no_implicit_reexport = True
strict_equality = True
warn_return_any = True

View File

@ -1,6 +1,6 @@
[tox] [tox]
minversion = 3.0 minversion = 3.0
envlist = py3{6,7,8}-cov, htmlcov envlist = mypy, py3{6,7,8}-cov, htmlcov
skip_missing_interpreters=true skip_missing_interpreters=true
[testenv] [testenv]
@ -33,6 +33,13 @@ commands =
coverage combine coverage combine
coverage html coverage html
[testenv:mypy]
deps =
-r dev-requirements.txt
skip_install = true
commands =
mypy
[testenv:codecov] [testenv:codecov]
passenv = * passenv = *
deps = deps =