-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
131 lines (116 loc) · 3.29 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-toml
- id: check-yaml
files: \.yaml$
- id: trailing-whitespace
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: end-of-file-fixer
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-added-large-files
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-case-conflict
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-merge-conflict
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-docstring-first
exclude: (migrations/|tests/|docs/|static/|media/).*
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
hooks:
- id: tox-ini-fmt
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff
args: ["--config=pyproject.toml"]
exclude: (migrations/|tests/|docs/|static/|media/|apps.py).*
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
exclude: (migrations/|tests/|docs/|static/|media/).*
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: ["--config=pyproject.toml"]
exclude: (migrations/|tests/|docs/|static/|media/).*
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: ["-c", "pyproject.toml", "-r", "."]
additional_dependencies: ["bandit[toml]"]
exclude: (migrations/|tests/|docs/|static/|media/).*
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.4.2
files: '\.rst$'
- repo: https://github.com/rstcheck/rstcheck
rev: "v6.2.4"
hooks:
- id: rstcheck
args: ["--report-level=warning"]
files: ^docs/(.*/)*.*\.rst$
additional_dependencies: ["Sphinx==6.2.1"]
- repo: https://github.com/regebro/pyroma
rev: "4.2"
hooks:
- id: pyroma
always_run: false
files: |
(?x)^(
README.md|
pyproject.toml|
)$
- repo: https://github.com/DanielNoord/pydocstringformatter
rev: v0.7.3
hooks:
- id: pydocstringformatter
args: ["--max-summary-lines=2", "--linewrap-full-docstring"]
files: "sage_invoice"
- repo: local
hooks:
- id: pytest
name: Pytest
entry: poetry run pytest -v
language: system
types: [python]
stages: [commit]
pass_filenames: false
always_run: true
- id: pylint
name: Pylint
entry: pylint
language: system
types: [python]
require_serial: true
args:
- "-rn"
- "-sn"
- "--rcfile=pyproject.toml"
- "--fail-under=9.0"
files: ^sage_invoice/
ci:
skip: [
pylint,
pytest
]