-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
28 lines (26 loc) · 951 Bytes
/
.pre-commit-config.yaml
File metadata and controls
28 lines (26 loc) · 951 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
hooks:
- id: fix-byte-order-marker
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]
- id: check-added-large-files
args: [--maxkb=500]
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: d1b833175a5d08a925900115526febd8fe71c98e # v0.15.11
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: local
hooks:
- id: ascii-check
name: ASCII-only source files
entry: python -c "import sys; hits=[f'{f}:{i+1}' for f in sys.argv[1:] for i,l in enumerate(open(f,'rb')) if any(b>127 for b in l)]; hits and (print('\n'.join(hits)) or sys.exit(1))"
language: system
types_or: [python, markdown, toml, yaml]