-
Notifications
You must be signed in to change notification settings - Fork 27
/
.pre-commit-config.yaml
80 lines (79 loc) · 2.33 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
---
# SPDX-FileCopyrightText: 2023 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
# For more information see
# https://pre-commit.com/index.html#install
# https://pre-commit.com/index.html#automatically-enabling-pre-commit-on-repositories
default_language_version:
# force all unspecified python hooks to run python3
python: python3
node: 17.9.0
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.1.0
hooks:
- id: check-ast
- id: check-docstring-first
- id: check-toml
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
args:
- "--markdown-linebreak-ext=md"
- repo: "https://github.com/pre-commit/pygrep-hooks"
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-use-type-annotations
- repo: "https://github.com/pycqa/isort"
rev: 5.11.5
hooks:
- id: isort
- repo: "https://github.com/psf/black"
rev: 22.3.0
hooks:
- id: black
- repo: "https://github.com/pre-commit/mirrors-prettier"
rev: v2.7.1
hooks:
- id: prettier
exclude_types:
- "python"
additional_dependencies:
- "prettier"
- repo: "https://github.com/asottile/pyupgrade"
rev: e695ecd365119ab4e5463f6e49bea5f4b7ca786b
hooks:
- id: pyupgrade
args:
- "--py36-plus"
- repo: "https://github.com/fsfe/reuse-tool"
rev: v0.14.0
hooks:
- id: reuse
additional_dependencies:
- python-debian==0.1.40
# jsonnetfmt requires golang 1.11+ and git 2.0, uncomment when we are compatible
# - repo: https://github.com/google/go-jsonnet.git
# rev: 2f2f6d664f06d064c4b3525ea34a789c1ac95cda
# hooks:
# - id: jsonnet-format
# language_version: "1.11"
# exclude: "empty.*|invalid.jsonnet"
# args:
# - "--in-place"
# - "--string-style"
# - "d"
# - "--comment-style"
# - "s"
# sort-all requires python 3.8+, uncomment when we are compatible
# - repo: "https://github.com/aio-libs/sort-all"
# rev: v1.1.0
# hooks:
# - id: sort-all
# language_version: "3.8"