-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
56 lines (47 loc) · 1.78 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
####################################################
# Checks about the pre-commit configuration itself #
####################################################
repos:
- repo: meta
hooks:
- id: check-hooks-apply # Ensures all defined hooks affect at least one file in the repo
- id: check-useless-excludes # Ensures all defined excludes apply to at least one file in the repo
###########################
# General use / built-ins #
###########################
# Click through to this repository to see what other goodies are available
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast # Checks Python code for syntax errors
- id: trailing-whitespace # Removes trailing whitespace from lines in all file types
- id: end-of-file-fixer # Fixes last line of all file types
- id: check-merge-conflict # Checks if you're about to commit a file that hasn't had conflicts resolved
- id: no-commit-to-branch # Checks if you're committing to a disallowed branch (default is master)
- id: check-toml # Checks TOML files for syntax errors
- id: check-yaml # Checks YAML files for syntax errors
args: [--allow-multiple-documents]
##########
# Python #
##########
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [typer, types-termcolor]
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py39-plus]
############
# Markdown #
############
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier