-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
40 lines (40 loc) · 1.29 KB
/
.pre-commit-config.yaml
File metadata and controls
40 lines (40 loc) · 1.29 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
40
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- repo: local
hooks:
- id: check-copyright-header
name: Check copyright headers
entry: python scripts/lint/check-copyright-header.py --check-and-fix
language: system
types: [python]
pass_filenames: false
- id: mypy
name: MyPy type checking
entry: bash -c 'mypy --version >&2; mypy "$@"' --
language: system
types_or: [python, pyi]
args: [--show-error-codes, --show-error-context]
files: ^(python|examples|tests)/
require_serial: true
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version
rev: v0.12.3
hooks:
# Run the linter with fixes (CI will detect if files were modified)
- id: ruff-check
name: Ruff linter
args: [--fix]
types_or: [python, pyi]
# Run the formatter - uses [tool.ruff] config from pyproject.toml
- id: ruff-format
name: Ruff formatter
types_or: [python, pyi]