Prevent tools/travis/mypy from failing silently.

Also improve the format of tools/travis/mypy's output.
Also add those files to the exclude list which are failing mypy check.
This commit is contained in:
Eklavya Sharma 2016-05-20 20:47:52 +05:30
parent ac13187d76
commit f3e25c68c7
2 changed files with 8 additions and 3 deletions

View File

@ -18,6 +18,8 @@ docs/conf.py
tools/deprecated/ tools/deprecated/
zproject/settings.py zproject/settings.py
zproject/test_settings.py zproject/test_settings.py
zproject/urls.py
zerver/management/commands/makemessages.py
zerver/migrations/ zerver/migrations/
zerver/tests/ zerver/tests/
""".split() """.split()

View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
set -e echo '+ ./tools/run-mypy'
set -x ./tools/run-mypy
if ./tools/run-mypy; then retcode="$?"
if [ "$retcode" == "0" ]; then
echo "The mypy static type checker for python detected no errors!" echo "The mypy static type checker for python detected no errors!"
else else
echo echo
@ -10,4 +12,5 @@ else
echo "which indicates a bug in your code or incorrect type annotations." echo "which indicates a bug in your code or incorrect type annotations."
echo "Please see http://zulip.readthedocs.io/en/latest/mypy.html for details" echo "Please see http://zulip.readthedocs.io/en/latest/mypy.html for details"
echo "on mypy, how Zulip is using mypy, and how to debug common issues." echo "on mypy, how Zulip is using mypy, and how to debug common issues."
exit "$retcode"
fi fi