-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
78 lines (61 loc) · 1.16 KB
/
Makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
SOURCE_GLOB=$(wildcard examples/*.py examples/**/*.py)
#
# Huan(202003)
# F811: https://github.com/PyCQA/pyflakes/issues/320#issuecomment-469337000
#
IGNORE_PEP=E203,E221,E241,E272,E501,F811
.PHONY: all
all : clean lint
.PHONY: clean
clean:
rm -fr dist/* .pytype
.PHONY: lint
lint: pylint pycodestyle flake8 mypy
# disable: TODO list temporay
.PHONY: pylint
pylint:
pylint \
--load-plugins pylint_quotes \
--disable=W0511,R0801,cyclic-import \
$(SOURCE_GLOB)
.PHONY: pycodestyle
pycodestyle:
pycodestyle \
--statistics \
--count \
--ignore="${IGNORE_PEP}" \
$(SOURCE_GLOB)
.PHONY: flake8
flake8:
flake8 \
--ignore="${IGNORE_PEP}" \
$(SOURCE_GLOB)
.PHONY: mypy
mypy:
MYPYPATH=stubs/ mypy \
$(SOURCE_GLOB)
.PHONY: pytype
pytype:
pytype \
-V 3.8 \
--disable=import-error \
examples/
.PHONY: install
install:
pip3 install -r requirements.txt
.PHONY: pytest
pytest:
pytest src/ tests/
.PHONY: test-unit
test-unit: pytest
.PHONY: test
test: lint pytest
.PHONY: check-python-version
check-python-version:
./scripts/check_python_version.py
.PHONY: dist
dist:
python3 setup.py sdist bdist_wheel
.PHONY: bot
bot:
python3 examples/ding-dong-bot.py