-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
27 lines (25 loc) · 1.17 KB
/
.pre-commit-config.yaml
File metadata and controls
27 lines (25 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# First repository: Uses Ruff for formatting and linting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6 # Specifies the version of the Ruff pre-commit hooks to use
hooks:
- id: ruff-format # Runs Ruff's code formatter
- id: ruff # Runs Ruff's linter
exclude: "packages/verifier/" # Excludes the "packages/verifier/" directory from linting
# Third repository: Local hooks (custom pre-commit checks)
- repo: local
hooks:
- id: pytest # Defines a local hook for running pytest
name: pytest # A human-readable name for the hook
entry: uv run pytest # The command to execute
language: system # Uses the system-installed pytest instead of a virtual environment
types: [python] # Applies only to Python files
pass_filenames: false # Run pytest on the entire test suite rather than just changed files
args: ["-vvv", "tests/unit"] # Runs pytest with verbose output and only unit tests