This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
90 lines (79 loc) · 2.5 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
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
default_install_hook_types:
- post-checkout
- pre-commit
- commit-msg
- post-merge
repos:
- repo: https://github.com/pre-commit/pre-commit
rev: v3.6.1
hooks:
- id: validate_manifest
- repo: meta
hooks:
# - id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# endings
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix, lf]
- id: trailing-whitespace
args: [--markdown-linebreak-ext, md]
# files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-symlinks
- id: destroyed-symlinks
- id: fix-byte-order-marker
# git
- id: check-added-large-files
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: no-commit-to-branch
- id: forbid-new-submodules
# python
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: debug-statements
# - id: double-quote-string-fixer # conflicts with black
- id: fix-encoding-pragma
args: [--remove]
- id: name-tests-test
# - id: requirements-txt-fixer # conflicts with poetry
# configs
- id: check-json
- id: pretty-format-json
- id: check-toml
- id: check-xml
- id: check-yaml
# - id: sort-simple-yaml # must specify files to check
# files: "^$"
# args: [--filenames, ""]
# - id: file-contents-sorter # must specify files to check
# files: "^$"
# args: [--filenames, ""]
# security
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- repo: https://github.com/python-poetry/poetry
rev: "1.7.0"
hooks:
- id: poetry-check
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.1
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix-only, --unsafe-fixes]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.14.1
hooks:
- id: commitizen
stages: [commit-msg]