-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
40 lines (39 loc) · 1.17 KB
/
.pre-commit-config.yaml
File metadata and controls
40 lines (39 loc) · 1.17 KB
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
# https://pre-commit.com/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# tidy up extra whitespace at end of files
- id: trailing-whitespace
# ensure consistent newline endings for files (\n only)
- id: end-of-file-fixer
# fix newlines in general to prevent pesky Windows users writing CRLF
- id: mixed-line-ending
args: [ --fix=lf ]
# do not allow pdb/breakpoint statements to be checked in
- id: debug-statements
# validate syntax of some file types
- id: check-yaml
- id: check-toml
# prevent large files being added
- id: check-added-large-files
# Code formatting and linting
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.1"
hooks:
- id: pyproject-fmt
- repo: https://github.com/pycqa/flake8
rev: 7.2.0
hooks:
- id: flake8
args: [--max-line-length=120]
- repo: https://github.com/python/black
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 6.0.1
hooks:
- id: isort
exclude: migrations
args: [ "--profile", "black", "--filter-files" ]