-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
39 lines (36 loc) · 1011 Bytes
/
.pre-commit-config.yaml
File metadata and controls
39 lines (36 loc) · 1011 Bytes
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
exclude: "^docs/|/migrations/|devcontainer.json"
default_stages: [pre-commit]
minimum_pre_commit_version: "3.2.0"
default_language_version:
python: python3.11
repos:
# pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: detect-private-key
- id: no-commit-to-branch
args: [--branch, main]
- id: check-added-large-files
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]
# Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.5
hooks:
# Linter
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
# Formatter
- id: ruff-format