-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
90 lines (83 loc) · 2.42 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
args: [--assume-in-merge]
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-yaml
args: [--unsafe] # Required to parse mkdocs.yml :(
- id: check-vcs-permalinks
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
# - id: no-commit-to-branch
# args: [--branch, main]
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
args: [ --fix ]
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.12
args:
- --line-length=120
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
files: \.py$
args:
- --license-filepath
- header.txt
- repo: local
hooks:
- id: pytest
name: pytest
language: script
pass_filenames: false
always_run: true
entry: .pre-commit-pytest.sh
- repo: local
hooks:
- id: pylint
name: pylint
language: script
pass_filenames: false
always_run: true
entry: .pre-commit-pylint.sh
- repo: local
hooks:
- id: docs
name: docs build
language: system
pass_filenames: false
always_run: true
entry: mkdocs build --strict