-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
43 lines (38 loc) · 1.14 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
# To enable repository pre-commits, run
# pip install pre-commit
# or
# conda install -c conda-forge pre-commit
# or equivalent to get the pre-commit package, then
# pre-commit install
repos:
# Automatically sort imports with isort
- repo: https://github.com/PyCQA/isort
rev: 6.0.0
hooks:
- id: isort
additional_dependencies: [toml]
# Automatic source code formatting with Black
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
args: [--safe, --quiet]
# Enforce style with Flake8
- repo: https://github.com/PyCQA/flake8
rev: 7.1.2
hooks:
- id: flake8
# Exclude docstring checks, ignore E203 (see https://github.com/PyCQA/pycodestyle/issues/373)
# and W503 (see https://github.com/psf/black/pull/36) for compatibility with Black.
args: ['--max-line-length=88', '--ignore=D1,E203,W503']
# Syntax check with pre-commit out-of-the-box hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: check-ast
- id: check-yaml
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=200']