Skip to content

Commit a113736

Browse files
committed
✨: add lefthook
Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
1 parent eb3e42b commit a113736

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
dev = [
4242
"pre-commit>=4.0.1",
4343
{ include-group = "test" },
44-
]
44+
"lefthook>=1.11.13",
45+
]
4546
test = [
4647
"pytest>=8.3.3",
4748
"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)