-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
39 lines (37 loc) · 1.11 KB
/
.pre-commit-config.yaml
File metadata and controls
39 lines (37 loc) · 1.11 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
28
29
30
31
32
33
34
35
36
37
38
39
# Pre-commit configuration for query automation project
repos:
# Ruff linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
# Ruff linter
- id: ruff
args: [--fix]
exclude: '\.ipynb$' # Ignore Jupyter notebooks
# Ruff formatter
- id: ruff-format
exclude: '\.ipynb$' # Ignore Jupyter notebooks
# Run pytest tests
- repo: local
hooks:
- id: pytest
name: Run pytest tests
entry: uv
args: [run, python, -m, pytest, tests/, -v, --tb=short, --ignore=tests/test_fastapi.py]
language: system
pass_filenames: false
always_run: true
require_serial: true
# Basic file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: '\.ipynb$'
- id: end-of-file-fixer
exclude: '\.ipynb$'
- id: check-yaml
- id: check-json
exclude: '\.ipynb$' # Jupyter notebooks are JSON but have special format
- id: check-merge-conflict
- id: check-case-conflict