Add mypy support
This commit is contained in:
parent
3c1bbfe738
commit
720b2cf3d2
16
mypy.ini
Normal file
16
mypy.ini
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[mypy]
|
||||||
|
|
||||||
|
check_untyped_defs = True
|
||||||
|
disallow_incomplete_defs = True
|
||||||
|
disallow_untyped_defs = True
|
||||||
|
disallow_any_generics = True
|
||||||
|
disallow_untyped_calls = True
|
||||||
|
disallow_untyped_decorators = True
|
||||||
|
disallow_subclassing_any = True
|
||||||
|
ignore_missing_imports = True
|
||||||
|
strict_optional = True
|
||||||
|
strict_equality = True
|
||||||
|
warn_redundant_casts = True
|
||||||
|
warn_return_any = True
|
||||||
|
warn_unused_configs = True
|
||||||
|
warn_unused_ignores = True
|
1
setup.py
1
setup.py
|
@ -14,6 +14,7 @@ extras_require = {
|
||||||
'lint': [
|
'lint': [
|
||||||
"flake8==3.4.1",
|
"flake8==3.4.1",
|
||||||
"isort>=4.2.15,<5",
|
"isort>=4.2.15,<5",
|
||||||
|
"mypy==0.701",
|
||||||
"pydocstyle>=3.0.0,<4",
|
"pydocstyle>=3.0.0,<4",
|
||||||
],
|
],
|
||||||
'doc': [
|
'doc': [
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -38,6 +38,7 @@ whitelist_externals=make
|
||||||
basepython=python
|
basepython=python
|
||||||
extras=lint
|
extras=lint
|
||||||
commands=
|
commands=
|
||||||
|
mypy -p {toxinidir}/<MODULE_NAME> --config-file {toxinidir}/mypy.ini
|
||||||
flake8 {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
flake8 {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||||
isort --recursive --check-only --diff {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
isort --recursive --check-only --diff {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||||
pydocstyle {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
pydocstyle {toxinidir}/<MODULE_NAME> {toxinidir}/tests
|
||||||
|
|
Loading…
Reference in New Issue
Block a user