zulip/tools/travis/static-analysis
Greg Price b8dcac1b42 run-mypy: Stop running mypy --py2.
Also unconditionally use the `mypy` from our virtualenv --
that's how we ensure we use a common version across different
Zulip developers and in CI.

And as a side effect of cutting some Python 2 vs. Python 3 logic,
fix a bug where `--all` was having no effect.
2017-08-16 17:54:43 -07:00

26 lines
714 B
Bash
Executable File

#!/bin/bash
set -e
set -x
retcode=0
./tools/run-mypy --linecoverage-report || retcode=1
set +x
if [ "$retcode" == "0" ]; then
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."
exit "$retcode"
fi
set -x
tools/check-py3
# 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.