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/
zproject/settings.py
zproject/test_settings.py
zproject/urls.py
zerver/management/commands/makemessages.py
zerver/migrations/
zerver/tests/
""".split()

View File

@ -1,8 +1,10 @@
#!/bin/bash
set -e
set -x
if ./tools/run-mypy; then
echo '+ ./tools/run-mypy'
./tools/run-mypy
retcode="$?"
if [ "$retcode" == "0" ]; then
echo "The mypy static type checker for python detected no errors!"
else
echo
@ -10,4 +12,5 @@ else
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 "on mypy, how Zulip is using mypy, and how to debug common issues."
exit "$retcode"
fi