mirror of
https://github.com/SELinuxProject/setools
synced 2025-02-28 10:01:19 +00:00
tox.ini: Add static type checking using mypy.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
This commit is contained in:
parent
49dd143df4
commit
41632dce9d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
/.eggs
|
||||
/.idea
|
||||
/.mypy_cache
|
||||
/build
|
||||
/dist
|
||||
/setools.egg-info
|
||||
|
13
.mypy.ini
Normal file
13
.mypy.ini
Normal file
@ -0,0 +1,13 @@
|
||||
[mypy]
|
||||
no_implicit_optional = True
|
||||
pretty = True
|
||||
|
||||
# NetworkX does not have annotations
|
||||
[mypy-networkx]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-networkx.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-PyQt5.*]
|
||||
ignore_missing_imports = True
|
@ -24,6 +24,7 @@ matrix:
|
||||
include:
|
||||
- env: TOX_ENV=pep8
|
||||
- env: TOX_ENV=lint
|
||||
- env: TOX_ENV=mypy
|
||||
# - env: TOX_ENV=coverage
|
||||
|
||||
# allow_failures:
|
||||
|
16
tox.ini
16
tox.ini
@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 1.4
|
||||
envlist = py3, pep8, lint
|
||||
envlist = py3, pep8, lint, mypy
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length = 100
|
||||
@ -33,6 +33,20 @@ commands = pylint -E --rcfile .pylintrc setools tests seinfo seinfoflow s
|
||||
# pylint can't see all members introduced by PyQt uic
|
||||
pylint -E --rcfile .pylintrc --disable=no-member,import-error setoolsgui apol
|
||||
|
||||
[testenv:mypy]
|
||||
deps = {[testenv]deps}
|
||||
mypy
|
||||
commands_pre = mypy --version
|
||||
commands = mypy -p setools
|
||||
mypy -p setoolsgui
|
||||
mypy seinfo
|
||||
mypy seinfoflow
|
||||
mypy sedta
|
||||
mypy sesearch
|
||||
mypy sediff
|
||||
mypy sechecker
|
||||
mypy apol
|
||||
|
||||
[testenv]
|
||||
passenv = USERSPACE_SRC
|
||||
deps = networkx==2.0
|
||||
|
Loading…
Reference in New Issue
Block a user