-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
91 lines (90 loc) · 2.57 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
---
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-docstring-first
description: Checks for code placed before a docstring.
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
description: Makes sure files end in a newline and only a newline.
- id: mixed-line-ending
description: >-
Replaces mixed line ending automatically with the most frequent line
ending.
- id: pretty-format-json
args: ["--autofix", "--no-sort-keys"]
- id: requirements-txt-fixer
description: >-
Sorts entries in requirements.txt and removes incorrect entry for
`pkg-resources==0.0.0`.
files: ^requirements\S*\.(in|txt)$
- id: trailing-whitespace
- repo: https://github.com/adrienverge/yamllint
rev: v1.29.0
hooks:
- id: yamllint
types: [file]
# SEE: https://regex101.com/r/ydseiS/4
files: \.(ya?ml(lint)?|cff)$
args: ["--strict"]
- repo: https://github.com/myint/docformatter
rev: v1.5.1
hooks:
- id: docformatter
name: Autoformat docstrings
args:
- "--in-place"
- "--pre-summary-newline"
- "--wrap-descriptions=88" # Match black
- "--wrap-summaries=88" # Match black
- repo: https://github.com/myint/rstcheck
rev: v6.1.1
hooks:
- id: rstcheck
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args:
- "--profile=black"
- "--thirdparty=azg"
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.1
hooks:
- id: autoflake
args:
- "--remove-all-unused-imports"
- "--remove-rhs-for-unused-variables"
- "--remove-unused-variables"
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-docstrings
- Flake8-pyproject
- flake8-simplify
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
additional_dependencies:
- mdformat-black
- mdformat-footnote
- mdformat-frontmatter
- mdformat-gfm
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell