-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
38 lines (35 loc) · 1.27 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
# Make sure pre-commit uses the same python version as we do
default_language_version:
# default language version for each language
python: python3.11
repos:
# Common builtin pre-commit hooks
# See https://pre-commit.com/hooks.html for more hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# simply checks whether the files parse as valid python.
- id: check-ast
# checks for files that would conflict in case-insensitive filesystem.
- id: check-case-conflict
# checks for files that contain merge conflict strings.
- id: check-merge-conflict
# checks for debugger imports and py37+ `breakpoint()` calls in python source.
- id: debug-statements
# ensures that a file is either empty, or ends with one newline.
- id: end-of-file-fixer
# trims trailing whitespace.
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.6.8"
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# Similar to pyupgrade but fixes Django deprecation and new syntax
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.21.0"
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]