-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
38 lines (37 loc) · 1.23 KB
/
.pre-commit-config.yaml
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
# This file must be copied to the root of a project
# Install pre-commit to project env via `pip install pre-commit`
# Update this config file: `pre-commit autoupdate`
# Install the pre-commit hooks for a project via: `pre-commit install`
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
# Check: https://pre-commit.com/hooks.html
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
args: [--maxkb=4550, --enforce-all] # define max file size in KB
- id: check-merge-conflict
- id: check-symlinks
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
args: [--unsafe, --allow-multiple-documents]
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: name-tests-test
args: [--pytest-test-first]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.4
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]