-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
43 lines (43 loc) · 1.32 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
# - id: check-json # TODO want to allow comments in vscode launch.json
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
# - id: pretty-format-json
# args: [ --autofix, --no-sort-keys ]
# - id: name-tests-test # TODO this odes not allow for other files in tests/ folder
# args: [ --pytest-test-first ]
# - id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [ --py311-plus ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
# - id: ruff # TODO this does not allow fixtures in pytest
# types_or: [ python, pyi, jupyter ]
# args: [ --fix ]
- id: ruff-format
types_or: [ python, pyi, jupyter ]