-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
65 lines (56 loc) · 1.9 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
# pre-commit configuration for Utopia
#
# NOTE See pyproject.toml for configuration options for some of these tools
---
# -- Hook definitions ---------------------------------------------------------
repos:
# Manually run this every now and again .....................................
# Command: pre-commit run --all-files --hook-stage manual
# Run if desiring to make use of newer language features
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.2
hooks:
- id: pyupgrade
name: upgrade python syntax
args:
- --py3-plus
- --py37-plus
stages: [manual]
# Default pre-commit hooks ..................................................
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
name: sort imports
additional_dependencies: [toml]
types: [python]
args: [--project=utopya, --settings, pyproject.toml]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
name: black code formatting
types: [python]
args: [--safe, --config, pyproject.toml]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
name: check RST backticks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
name: fix end of files
- id: check-added-large-files
name: no large files added
args: ["--maxkb=256"]
- id: no-commit-to-branch
name: do not commit to protected branch directly
args: [--branch, master, --branch, v1]
- id: check-merge-conflict
name: no leftover merge conflict strings
# TODO Consider activating this as well -- but causes many many changes
# - id: trailing-whitespace
# name: fix trailing whitespace
# args: [--markdown-linebreak-ext=md]