-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
44 lines (35 loc) · 957 Bytes
/
Taskfile.yml
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
version: '3'
output: prefixed
tasks:
install-pre-commit:
cmds:
- cp .pre-commit .git/hooks/pre-commit
- chmod +x .git/hooks/pre-commit
pre-commit:
cmds:
- echo Stashing unstaged changes... && git diff > /tmp/diff && git apply --allow-empty --reverse /tmp/diff
- defer: echo Restoring unstaged changes... && git apply --allow-empty /tmp/diff
- task: check
fmt:
cmds:
- poetry run black .
- poetry run ruff check --fix .
check:
cmds:
- task: lint
- task: test
- task: check-readme
lint:
cmds:
- poetry run black . --check
- poetry run ruff check .
- poetry run mypy . --strict
test:
cmds:
- poetry run pytest {{.CLI_ARGS}}
make-readme:
cmds:
- poetry run python make_readme.py .README.template.md > README.md
check-readme:
cmds:
- poetry run python make_readme.py .README.template.md --check_file README.md