-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
74 lines (66 loc) · 2.05 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast # Is it valid Python?
- id: debug-statements # no debugging statements used
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
# - id: name-tests-test
- id: check-docstring-first
- id: requirements-txt-fixer
- id: detect-private-key
# - id: check-executables-have-shebangs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
hooks:
# linter.
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [ black==22.1 ]
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
exclude: (docs|tests)
args:
- --max-line-length=120
- --ignore=E501,W503
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-tidy-imports
# - repo: https://github.com/mgedmin/check-manifest
# rev: "0.49"
# hooks:
# - id: check-manifest
# args: [ "--no-build-isolation", "--ignore", "*.png,docs/*,paper/*,scripts/*,setup.py,publish.py,readthedocs.yml,poetry.lock" ]
# additional_dependencies: [ numpy, poetry==1.3.2]
# TODO sphinx check
# - repo: https://github.com/myint/rstcheck
# rev: 'v3.3.1'
# hooks:
# - id: rstcheck
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
# # very detailed linting:
# - repo: https://github.com/pycqa/pylint
# rev: pylint-2.6.0
# hooks:
# - id: pylint
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
exclude: ^((tests|scripts)/)