-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
45 lines (45 loc) · 1.67 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
repos:
################################################################################
# GENERAL HOOKS
################################################################################
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ['--maxkb=50000']
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-toml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
################################################################################
# PYTHON SPECIFIC
################################################################################
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
args: ['--line-length', '79']
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ['--profile', 'black',
'--line-length', '79']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: ruff
args: ['--ignore=E741', '--ignore=E731', '--ignore=E402', '--ignore=E711', '--ignore=E712', '--ignore=E721', '--fix']
# user can unignore E712, E711, E721, and E402 to see errors
################################################################################
# TYPOS
################################################################################
- repo: https://github.com/crate-ci/typos
rev: v1.24.6
hooks:
- id: typos
args: ["--force-exclude"]
# --force-exclude makes it such that typos are not automatically fixed
################################################################################