2016-04-18 11:46:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-07-25 04:46:15 +02:00
|
|
|
set -e
|
2016-07-02 21:22:10 +02:00
|
|
|
set -x
|
2017-07-25 04:46:15 +02:00
|
|
|
|
|
|
|
retcode=0
|
2016-07-02 21:22:10 +02:00
|
|
|
./tools/run-mypy --py2 --linecoverage-report || retcode=1
|
|
|
|
./tools/run-mypy --py3 || retcode=1
|
|
|
|
set +x
|
2016-05-20 17:17:52 +02:00
|
|
|
if [ "$retcode" == "0" ]; then
|
2016-05-05 22:32:17 +02:00
|
|
|
echo "The mypy static type checker for python detected no errors!"
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo "The mypy static type checker for Python threw some errors,"
|
|
|
|
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."
|
2016-05-20 17:17:52 +02:00
|
|
|
exit "$retcode"
|
2016-05-05 22:32:17 +02:00
|
|
|
fi
|
2017-07-25 04:46:15 +02:00
|
|
|
set -x
|
2016-07-11 06:53:08 +02:00
|
|
|
|
|
|
|
tools/check-py3
|
2017-07-25 04:46:15 +02:00
|
|
|
|
|
|
|
# NB: Everything here should be in `tools/test-all`. If there's a
|
|
|
|
# reason not to run it there, it should be there as a comment
|
|
|
|
# explaining why.
|