forked from vutran1710/PyrateLimiter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.py
More file actions
35 lines (27 loc) · 901 Bytes
/
scripts.py
File metadata and controls
35 lines (27 loc) · 901 Bytes
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
from subprocess import check_call
def format():
check_call(["black", "pyrate_limiter/"])
check_call(["black", "tests/"])
check_call(["isort", "."])
def lint() -> None:
check_call(["flake8", "pyrate_limiter/"])
check_call(["flake8", "tests/"])
check_call(["pylint", "pyrate_limiter/", "--rcfile=setup.cfg"])
check_call(["pylint", "tests/", "--rcfile=setup.cfg"])
def cover() -> None:
check_call(["radon", "mi", "-x", "A", "."])
check_call(["coverage", "run", "-m", "--source=pyrate_limiter", "pytest", "tests", "--maxfail=1"])
check_call(["coverage", "report", "-m"])
check_call(["coverage", "xml"])
def test() -> None:
check_call(
[
"pytest",
"tests",
"--maxfail=1",
"--verbose",
"-s",
"--fulltrace",
]
)
check_call(["radon", "mi", "-x", "A", "."])