-
Notifications
You must be signed in to change notification settings - Fork 194
/
.pre-commit-config.yaml
100 lines (100 loc) · 2.76 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
91
92
93
94
95
96
97
98
99
100
default_install_hook_types:
- commit-msg
- pre-commit
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://gitlab.wikimedia.org/repos/ci-tools/commit-message-validator
rev: v2.1.0
hooks:
- id: commit-message-validator
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
exclude: '^tests/data/'
- id: forbid-new-submodules
- id: mixed-line-ending
- id: pretty-format-json
args:
- --autofix
- --indent=4
- --no-ensure-ascii
exclude: pywikibot/scripts/i18n/pywikibot/
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=rst
exclude: '^tests/data/'
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods
- id: python-use-type-annotations
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args:
- --py37-plus
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args:
- --expand-star-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
exclude: '^pywikibot/backports\.py$'
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
exclude: '^pwb\.py$'
- repo: https://github.com/jshwi/docsig
rev: v0.64.1
hooks:
- id: docsig
exclude: ^(tests|scripts)
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
args:
- --doctests
additional_dependencies:
# Due to incompatibilities between packages the order matters.
- flake8-bugbear!=24.1.17
- flake8-comprehensions>=3.13.0
- flake8-mock-x2
- flake8-print>=5.0.0
- flake8-quotes>=3.3.2
- flake8-raise
- flake8-tuple>=0.4.1
- pep8-naming>=0.13.3