File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+
4+ #
5+ # NAVIGATE TO CORRECT DIRECTORY
6+ #
7+
8+ # start by going to script dir so all movements
9+ # from here are relative
10+ SCRIPT_DIR=` dirname $( realpath " $0 " ) `
11+ cd $SCRIPT_DIR
12+
13+
14+ function check {
15+ cd ..
16+ # enable app virtual environment
17+ eval " $( direnv export bash) "
18+ if [ ! $PYTHONPATH ]; then
19+ export PYTHONPATH=$PWD
20+ fi
21+ echo " "
22+
23+ echo " "
24+ echo " Starting type checks..."
25+ echo " "
26+
27+ echo " Checking ./db_wrapper..."
28+ echo " "
29+ mypy db_wrapper
30+ mypy_src_result=$?
31+
32+ if [ $mypy_src_result != 0 ]; then
33+ echo " Error in typechecking, see output above."
34+ exit $mypy_src_result
35+ fi
36+
37+
38+ echo " "
39+ echo " Checking ./tests..."
40+ echo " "
41+ mypy tests
42+ mypy_tests_result=$?
43+
44+ if [ $mypy_tests_result != 0 ]; then
45+ echo " Error in typechecking, see output above."
46+ exit $mypy_tests_result
47+ fi
48+
49+ # return to scripts directory
50+ cd $SCRIPT_DIR
51+ echo " "
52+ }
53+
54+ check
You can’t perform that action at this time.
0 commit comments