File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Lint and Type Check
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ qol :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v3
10+ - uses : actions/setup-python@v4
11+ with :
12+ python-version : ' 3.11'
13+ - name : Install dependencies
14+ run : |
15+ pip install poetry
16+ poetry install
17+ - name : Lint
18+ run : |
19+ pip install ruff
20+ make lint
21+ - name : Type check
22+ run : |
23+ pip install pyright
24+ make type-check
Original file line number Diff line number Diff line change 1+ # Define variables
2+ PYTHON = python3
3+ PIP = pip3
4+ RUFF = ruff
5+ PYRIGHT = pyright
6+
7+ # Define targets
8+ .PHONY : all lint fix type-check clean
9+
10+ all : lint fix type-check
11+
12+ lint :
13+ $(RUFF ) check .
14+
15+ fix :
16+ $(RUFF ) check . --fix
17+
18+ type-check :
19+ poetry run $(PYRIGHT )
20+
21+ clean :
22+ rm -rf __pycache__
23+ rm -rf .pytest_cache
24+ rm -rf site
You can’t perform that action at this time.
0 commit comments