-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdev.py
45 lines (35 loc) · 920 Bytes
/
dev.py
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
# noqa: INP001
from subprocess import check_call
def hooks() -> None:
check_call(["pre-commit", "run", "--all-files"])
def format() -> None:
check_call(["black", "."])
check_call(["isort", "."])
check_call(
[
"autoflake",
"--in-place",
"--recursive",
"--remove-all-unused-imports",
"--remove-unused-variables",
"--ignore-init-module-imports",
".",
]
)
def lint() -> None:
check_call(["flake8", "."])
check_call(["mypy", "src", "tests"])
def test() -> None:
check_call(["pytest"])
def test_ci() -> None:
check_call(
[
"pytest",
"-v",
"--cov=src",
"--cov-branch",
"--cov-report=xml:build/coverage.xml",
"--cov-report=html:build/htmlcov",
"--junitxml=build/tests.xml",
]
)