blob: ddc1a48903eeccf033935f7fbc8135b9a64d3ccb [file] [log] [blame]
koder aka kdanilov39e449e2016-12-17 15:15:26 +02001.PHONY: mypy pylint pylint_e
koder aka kdanilov22d134e2016-11-08 11:33:19 +02002
3
4ALL_FILES=$(shell find wally/ -type f -name '*.py')
5STUBS="stubs:.env/lib/python3.5/site-packages"
koder aka kdanilov39e449e2016-12-17 15:15:26 +02006ACTIVATE=cd ~/workspace/wally; source .env/bin/activate
koder aka kdanilov22d134e2016-11-08 11:33:19 +02007
8mypy:
koder aka kdanilov39e449e2016-12-17 15:15:26 +02009 bash -c "${ACTIVATE}; MYPYPATH=${STUBS} python3 -m mypy -s ${ALL_FILES}"
10
11
12PYLINT_FMT=--msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
13
14pylint:
15 bash -c "${ACTIVATE} ; python3 -m pylint '${PYLINT_FMT}' --rcfile=pylint.rc ${ALL_FILES}"
16
17pylint_e:
18 bash -c "${ACTIVATE} ; python3 -m pylint -E '${PYLINT_FMT}' --rcfile=pylint.rc ${ALL_FILES}"