Skip to content

Commit 5941161

Browse files
chore: pre-commit hooks for linting, tests, and conventional commits (#3)
* ci: add pre-commit configuration with linters, tests, and conventional commits Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com> * chore: enable Renovate pre-commit manager to auto-update hook versions Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com>
1 parent 059d863 commit 5941161

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.15.2
4+
hooks:
5+
- id: ruff-check
6+
args: [--fix]
7+
- id: ruff-format
8+
9+
- repo: https://github.com/compilerla/conventional-pre-commit
10+
rev: v4.4.0
11+
hooks:
12+
- id: conventional-pre-commit
13+
stages: [commit-msg]
14+
15+
- repo: local
16+
hooks:
17+
- id: mypy
18+
name: mypy
19+
entry: uv run mypy src/
20+
language: system
21+
types: [python]
22+
pass_filenames: false
23+
always_run: true
24+
- id: pytest
25+
name: pytest
26+
entry: uv run pytest --tb=short -q
27+
language: system
28+
types: [python]
29+
pass_filenames: false
30+
always_run: true

renovate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
44
"config:recommended",
5-
"helpers:pinGitHubActionDigests"
5+
"helpers:pinGitHubActionDigests",
6+
":enablePreCommit"
67
]
78
}

0 commit comments

Comments
 (0)