-
Notifications
You must be signed in to change notification settings - Fork 533
/
Copy path.pre-commit-config.yaml
42 lines (41 loc) · 1.35 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
39
40
41
42
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=10240]
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-symlinks
- id: check-vcs-permalinks
- id: destroyed-symlinks
- id: detect-private-key
- id: trailing-whitespace # Trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
exclude: user_data/.*
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-ast # Simply check whether files parse as valid python.
- id: check-yaml
args: [--allow-multiple-documents]
exclude: |
(?x)^(
.gitlab/ci/.*\.(json|yml|yaml)$|
.gitlab-ci.yml
)$
- id: end-of-file-fixer
- id: fix-byte-order-marker
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.2
hooks:
# Run the linter.
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]