-
Notifications
You must be signed in to change notification settings - Fork 16
/
mypy.sh
executable file
·44 lines (33 loc) · 1.01 KB
/
mypy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
CURRENT_DIR="$(pwd)"
# get the full path of the directory where the current script is:
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
RETVAL=0
echo "running $SCRIPT_DIR/mypy.sh"
MYPY="mypy --strict --show-error-codes --pretty"
echo cd $SCRIPT_DIR/engine
cd $SCRIPT_DIR/engine
echo ${MYPY} *.py
${MYPY} *.py
ENGINE_RETVAL=$?
if [ ${ENGINE_RETVAL} != 0 ] ; then
RETVAL=$((${RETVAL} + ${ENGINE_RETVAL}))
fi
echo cd $SCRIPT_DIR/setup
cd $SCRIPT_DIR/setup
echo ${MYPY} ../engine/{tabsqlitedb,itb_util,itb_emoji}.py *.py
${MYPY} ../engine/{tabsqlitedb,itb_util,itb_emoji}.py *.py
SETUP_RETVAL=$?
if [ ${SETUP_RETVAL} != 0 ] ; then
RETVAL=$((${RETVAL} + ${SETUP_RETVAL}))
fi
echo cd $SCRIPT_DIR/tests
cd $SCRIPT_DIR/tests
echo ${MYPY} ../engine/{tabsqlitedb,itb_util,itb_emoji}.py test_*.py
${MYPY} ../engine/{tabsqlitedb,itb_util,itb_emoji}.py test_*.py
SETUP_RETVAL=$?
if [ ${SETUP_RETVAL} != 0 ] ; then
RETVAL=$((${RETVAL} + ${SETUP_RETVAL}))
fi
cd $CURRENT_DIR
exit $RETVAL