forked from mozilla/django-csp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
35 lines (35 loc) · 1018 Bytes
/
.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
# Global excludes, override per repo below if different excludes required.
# exclude: >
# (?x)^(
# DIRNAME_OR_FILENAME_HERE
# | DIRNAME_OR_FILENAME_HERE
# | DIRNAME_OR_FILENAME_HERE
# )
repos:
# Note: hooks that add content must run before ones which check formatting, lint, etc
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
# Run the linter
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.3
hooks:
- id: pyproject-fmt
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.4.2
files: 'docs/.*\.rst$'
args: ["--rst-literal-block"]