-
Notifications
You must be signed in to change notification settings - Fork 239
/
.pre-commit-config.yaml
49 lines (43 loc) · 2.43 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast # Simply check whether the files parse as valid python
- id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-toml # Attempts to load all TOML files to verify syntax
- id: check-yaml # Attempts to load all YAML files to verify syntax
- id: check-vcs-permalinks # Ensures that links to VCS websites are permalinks
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls in python source
- id: detect-private-key # Detects the presence of private keys
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline
- id: mixed-line-ending # Replaces or checks mixed line ending
- id: trailing-whitespace # Trims trailing whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa # enforce that noqa annotations always occur with specific codes
- id: python-check-blanket-type-ignore # enforce that # type: ignore annotations always occur with specific codes
- id: python-no-log-warn # check for the deprecated .warn() method of python loggers
- id: python-use-type-annotations # enforce that type annotations are used instead of type comments
- id: rst-backticks # detect common mistake of using single backticks when writing rst
- id: rst-directive-colons # detect mistake of rst directive not ending with double colon
- id: rst-inline-touching-normal # detect mistake of inline code touching normal text in rst
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: ['--py39-plus', '--keep-runtime-typing']
- repo: https://github.com/PyCQA/doc8
rev: v1.1.2
hooks:
- id: doc8
ci:
autoupdate_commit_msg: Autoupdate pre-commit hooks