mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-12 17:18:30 +02:00
Add proper exit code check to mypy script.
This commit is contained in:
parent
c5c2d34591
commit
0b7ba6a998
2 changed files with 21 additions and 0 deletions
|
@ -8,7 +8,10 @@ install:
|
||||||
- "pip install -r requirements.dev.txt"
|
- "pip install -r requirements.dev.txt"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
# Run the test suit
|
||||||
- nosetests --with-coverage --cover-package=stegano
|
- nosetests --with-coverage --cover-package=stegano
|
||||||
|
# Run the type checker
|
||||||
|
- python tools/run_mypy.py
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
|
|
18
tools/run_mypy.py
Normal file
18
tools/run_mypy.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
modules = ["stegano/tools.py",
|
||||||
|
"stegano/lsb/lsb.py",
|
||||||
|
"stegano/lsbset/lsbset.py",
|
||||||
|
"stegano/lsbset/generators.py",
|
||||||
|
"stegano/red/red.py",
|
||||||
|
"stegano/exifHeader/exifHeader.py",
|
||||||
|
"stegano/steganalysis/parity.py",
|
||||||
|
"stegano/steganalysis/statistics.py"]
|
||||||
|
|
||||||
|
exit_codes = []
|
||||||
|
for module in modules:
|
||||||
|
rc = subprocess.call(["mypy", "--ignore-missing-imports",
|
||||||
|
"--follow-imports", "skip", module])
|
||||||
|
exit_codes.append(rc)
|
||||||
|
sys.exit(max(exit_codes))
|
Loading…
Add table
Reference in a new issue