Skip to content

Commit 4b6c44c

Browse files
nstarmanjorenham
andauthored
✨: add lefthook (#16)
Co-authored-by: Joren Hammudoglu <[email protected]>
1 parent eb3e42b commit 4b6c44c

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

lefthook.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Refer for explanation to following link:
2+
# https://lefthook.dev/configuration/
3+
#
4+
5+
pre-commit:
6+
parallel: true
7+
jobs:
8+
- name: ruff-fix
9+
glob: "*.py"
10+
run: uv run ruff check --fix {staged_files}
11+
- name: ruff-format
12+
glob: "*.py"
13+
run: uv run ruff format {staged_files}
14+
- name: mypy
15+
glob: "*.py"
16+
run: uv run mypy {staged_files}

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939

4040
[dependency-groups]
4141
dev = [
42-
"pre-commit>=4.0.1",
4342
{ include-group = "test" },
44-
]
43+
"lefthook>=1.11.13",
44+
]
4545
test = [
4646
"pytest>=8.3.3",
4747
"pytest-cov>=3",

uv.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)