-
-
Notifications
You must be signed in to change notification settings - Fork 220
/
.pre-commit-config.yaml
84 lines (75 loc) · 2.08 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
ci:
skip: [blacken-docs, build-docs]
exclude: |
(?x)^(
.bumpversion.cfg|
cx_Freeze/hooks/pyqt5/resource.py|
cx_Freeze/hooks/pyside2/resource.py|
cx_Freeze/hooks/pyside6/resource.py|
cx_Freeze/importshed/.*.pyi|
doc/src/conf.py
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- id: trailing-whitespace
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
additional_dependencies:
- validate-pyproject-schema-store[all]>=2024.11.22
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
args: ["--fix", "--unsafe-fixes"]
- id: ruff-format
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.10.0
args: ["-l", "79"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
hooks:
- id: clang-format
args: ["--style={BasedOnStyle: WebKit, ColumnLimit: 79, AlignConsecutiveMacros: Consecutive, AlignTrailingComments: Always}"]
- repo: local
hooks:
- id: build-docs
name: build sphinx docs
language: system
entry: python -m sphinx doc/src build/doc/html -d build/doc/.doctrees -j auto -T -W --keep-going -n -b html
always_run: true
pass_filenames: false
- repo: local
hooks:
- id: license
name: license
language: system
entry: python ci/license.py
files: ^(doc/src/license.rst|cx_Freeze/initscripts/frozen_application_license.txt)$
- repo: local
hooks:
- id: requirements
name: requirements
language: system
entry: python ci/requirements.py
files: ^(pyproject.toml|requirements.*.txt)$