-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
143 lines (137 loc) · 4.37 KB
/
.pre-commit-config.yaml
File metadata and controls
143 lines (137 loc) · 4.37 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
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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: superseeded
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-ast
name: check python ast
description: simply checks whether the files parse as valid python.
entry: check-ast
language: python
types: [python]
- id: check-added-large-files
name: check for added large files
description: prevents giant files from being committed.
entry: check-added-large-files
language: python
stages: [pre-commit, pre-push, manual]
minimum_pre_commit_version: 3.2.0
args: ["--maxkb=1024"]
- id: check-yaml
name: check yaml
description: checks yaml files for parseable syntax.
entry: check-yaml
language: python
types: [yaml]
- id: check-json
name: check json
description: checks json files for parseable syntax.
entry: check-json
language: python
types: [json]
- id: check-toml
name: check toml
description: checks toml files for parseable syntax.
entry: check-toml
language: python
types: [toml]
- id: end-of-file-fixer
name: fix end of files
description: ensures that a file is either empty, or ends with one newline.
entry: end-of-file-fixer
language: python
types: [text]
stages: [pre-commit, pre-push, manual]
minimum_pre_commit_version: 3.2.0
- id: no-commit-to-branch
name: "don't commit to branch"
entry: no-commit-to-branch
language: python
pass_filenames: false
always_run: true
- id: trailing-whitespace
args: ["--markdown-linebreak-ext=md,markdown"]
name: trim trailing whitespace
description: trims trailing whitespace.
entry: trailing-whitespace-fixer
language: python
types: [text]
stages: [pre-commit, pre-push, manual]
minimum_pre_commit_version: 3.2.0
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
name: shellcheck
description: "Test shell scripts with shellcheck"
entry: shellcheck
language: python
types: [shell]
require_serial: true
- repo: https://github.com/PyCQA/flake8
rev: 7.3.0
hooks:
- id: flake8
name: flake8
description: "`flake8` is a command-line utility for enforcing style consistency across Python projects."
entry: flake8
language: python
types: [python]
require_serial: true
additional_dependencies: [Flake8-pyproject]
args:
- --toml-config=./pyproject.toml
- repo: https://github.com/PyCQA/isort
rev: 6.0.1
hooks:
- id: isort
name: isort
description: "Isort your imports, so you don't have to"
entry: isort
language: python
args:
- --settings-path=./pyproject.toml
- repo: https://github.com/psf/black
rev: 25.9.0
hooks:
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: black
language: python
require_serial: true
types_or: [python, pyi]
args:
- --config=./pyproject.toml
- id: black-jupyter
name: black-jupyter
description: "Black: The uncompromising Python code formatter (with Jupyter Notebook support)"
entry: black
language: python
require_serial: true
types_or: [python, pyi, jupyter]
additional_dependencies: [".[jupyter]"]
args:
- --config=./pyproject.toml
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
name: mypy
entry: mypy
require_serial: true
language: python
types: [python]
args:
- --config-file=./pyproject.toml
additional_dependencies:
- django-stubs
- djangorestframework
- djangorestframework-stubs[compatible-mypy]
- repo: https://github.com/biomejs/pre-commit
rev: "v2.2.4" # Use the sha / tag you want to point at
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/biome@2.2.4"]