-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.pre-commit-config.yaml
80 lines (73 loc) · 2.67 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
# Initial content coming from
# https://github.com/pre-commit/pre-commit-hooks/blob/master/.pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
## The generated types/requests/responses are huge!
#- id: check-added-large-files
- id: check-yaml
- id: debug-statements
## Disabled because it compains about additional modules used in testing
#- id: name-tests-test
# args: ['--django']
- id: requirements-txt-fixer
- id: check-ast
- id: check-builtin-literals
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: file-contents-sorter
- id: forbid-new-submodules
- id: mixed-line-ending
- id: pretty-format-json
- id: sort-simple-yaml
# ------------------------------------------------------------------------------------------------------------------ #
# Ruff is an extremely fast Python linter and formatter, written in Rust. It is intended to replace Flake8, isort,
# pydocstyle, yesqa, eradicate, pyupgrade, autoflake, and black.
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit
rev: v3.7.0
hooks:
- id: validate_manifest
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies: [types-all, types-attrs]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
- id: prettier
exclude_types: [html]
stages: [commit]
exclude: "docs/api|CHANGELOG.md" # huge files break prettier, autogenerated files can be problematic
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0 # or specific git tag
hooks:
- id: shfmt
# end