forked from starenka/mailjetv3
-
Notifications
You must be signed in to change notification settings - Fork 40
/
.pre-commit-config.yaml
190 lines (167 loc) · 4.93 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
---
# Apply to all files without committing:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
exclude: ^(.*/versioneer\.py|.*/_version\.py|.*/.*\.svg)
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: weekly
skip: []
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-vcs-permalinks
# Fail if staged files are above a certain size.
# To add a large file, use 'git lfs track <file>; git add <file> to track large files with
# git-lfs rather than committing them directly to the git history
- id: check-added-large-files
args: [ "--maxkb=500" ]
- id: fix-byte-order-marker
- id: check-case-conflict
# Fails if there are any ">>>>>" lines in files due to merge conflicts.
- id: check-merge-conflict
# ensure syntaxes are valid
- id: check-toml
- id: debug-statements
- id: detect-private-key
# Makes sure files end in a newline and only a newline;
- id: end-of-file-fixer
- id: mixed-line-ending
# Trims trailing whitespace. Allow a single space on the end of .md lines for hard line breaks.
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
# Sort requirements in requirements.txt files.
- id: requirements-txt-fixer
# Prevent committing directly to trunk
- id: no-commit-to-branch
args: [ "--branch=master" ]
# Detects the presence of private keys
- id: detect-private-key
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [--write]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
hooks:
- id: check-github-workflows
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
exclude: ^docs/
- repo: https://github.com/akaihola/darker
rev: v2.1.1
hooks:
- id: darker
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --remove-unused-variable
- --ignore-init-module-imports
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
- radon
- flake8-docstrings
- Flake8-pyproject
exclude: ^docs/
- repo: https://github.com/PyCQA/pylint
rev: v3.3.2
hooks:
- id: pylint
args:
- --exit-zero
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: v0.8.2
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/dosisod/refurb
rev: v2.0.0
hooks:
- id: refurb
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
args:
[
--config-file=./pyproject.toml,
]
exclude: ^samples/
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.390
hooks:
- id: pyright
- repo: https://github.com/PyCQA/bandit
rev: 1.8.0
hooks:
- id: bandit
args: ["-c", "pyproject.toml", "-r", "."]
# ignore all tests, not just tests data
exclude: ^tests/
additional_dependencies: [".[toml]"]
- repo: https://github.com/crate-ci/typos
rev: typos-dict-v0.11.37
hooks:
- id: typos
# - repo: https://github.com/google/yapf
# rev: v0.40.2
# hooks:
# - id: yapf
# name: "yapf"
# additional_dependencies: [toml]
# - repo: https://github.com/mattseymour/pre-commit-pytype
# rev: '2023.5.8'
# hooks:
# - id: pytype
# - repo: https://github.com/executablebooks/mdformat
# rev: 0.7.17
# hooks:
# - id: mdformat
# additional_dependencies:
# # gfm = GitHub Flavored Markdown
# - mdformat-gfm
# - mdformat-black
# - repo: https://github.com/adrienverge/yamllint.git
# rev: v1.35.1
# hooks:
# - id: yamllint
# #args: [--strict]
# entry: yamllint
# language: python
# types: [ file, yaml ]