File tree Expand file tree Collapse file tree 4 files changed +40
-107
lines changed
Expand file tree Collapse file tree 4 files changed +40
-107
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,13 @@ jobs:
3232 run : poetry install --with dev
3333
3434 - name : Check Format
35- run : |
36- poetry run poe format
37- git diff --exit-code HEAD
35+ run : poetry run ruff format --diff
3836
3937 - name : Check Lint
40- run : poetry run poe lint
38+ run : poetry run ruff check
4139
4240 - name : Test Package
43- run : poetry run poe test
41+ run : poetry run pytest -v --cov
4442
4543 - name : Build Package
4644 run : poetry build
Original file line number Diff line number Diff line change 1+ pre-commit :
2+ piped : true
3+ jobs :
4+ - name : install dependencies
5+ run : poetry install --with dev
6+ glob :
7+ - poetry.lock
8+ - poetry.toml
9+ - pyproject.toml
10+
11+ - name : fix formatting
12+ run : poetry run ruff format
13+ glob : " *.py"
14+
15+ - name : fix lint
16+ run : poetry run ruff check --fix
17+ glob : " *.py"
18+
19+ - name : check diff
20+ run : git diff --exit-code dist {staged_files}
Original file line number Diff line number Diff line change @@ -32,23 +32,21 @@ python = "^3.10"
3232optional = true
3333
3434[tool .poetry .group .dev .dependencies ]
35+ lefthook = " ^1.11.14"
3536pytest = " ^8.4.0"
36- poethepoet = " ^0.35.0"
3737pytest-cov = " ^6.2.1"
3838ruff = " ^0.11.13"
3939
4040[tool .poetry .scripts ]
4141my_fibonacci = " my_fibonacci.__main__:main"
4242
43- [tool .poe .tasks ]
44- format = " ruff format lib tests"
45- lint = " ruff check lib tests"
46- test = " pytest -v --cov=my_fibonacci"
47-
4843[tool .coverage .report ]
4944fail_under = 100
5045omit = [" __main__.py" ]
5146
47+ [tool .coverage .run ]
48+ source = [" my_fibonacci" ]
49+
5250[tool .ruff .lint ]
5351select = [" ALL" ]
5452ignore = [" D" ]
You can’t perform that action at this time.
0 commit comments