-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
50 lines (50 loc) · 1.12 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
43
44
45
46
47
48
49
50
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: pretty-format-json
args:
- --no-sort-keys
- --no-ensure-ascii
- --autofix
- repo: local
hooks:
- id: ruff
name: ruff
entry: ruff check
language: system
args:
- --fix
types: [ python ]
# TODO: Replace autoflake, isort, and black with ruff once ruff supports public APIs (https://github.com/astral-sh/ruff/issues/659)
- id: autoflake
name: autoflake
entry: autoflake
language: system
args:
- --recursive
- --check-diff
- --remove-all-unused-imports
- --ignore-init-module-imports
- --ignore-pass-statements
- --quiet
types: [ python ]
- id: isort
name: isort
entry: isort
language: system
args:
- --check
types: [ python ]
- id: black
name: black
entry: black
language: system
args:
- --check
types: [ python ]