-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
87 lines (77 loc) · 2.31 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
---
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-executables-have-shebangs
- id: mixed-line-ending
args: [--fix=lf]
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- id: check-docstring-first
- id: check-toml
- id: check-yaml
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
hooks:
- id: check-github-workflows
name: validate github workflows
- id: check-renovate
name: validate renovate config
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0 # Use the ref you want to point at
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods
- id: python-use-type-annotations
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: local
hooks:
- id: pyproject.toml
name: validate pyproject.toml
language: system
entry: poetry check
files: 'pyproject\.toml'
pass_filenames: false
- id: poetry-lock
name: poetry-lock
stages: [post-commit, post-merge]
language: system
entry: poetry install
files: 'poetry\.lock'
- id: version
name: verify version is set correctly
language: system
entry: poetry run pytest --quiet --no-header --no-summary --no-cov -k version
files: 'pyproject\.toml|downforeveryone/__init__.py'
pass_filenames: false
- id: ruff
name: format python code with ruff
language: system
entry: poetry run ruff format
types: [python]
- id: ruff
name: lint python code with ruff
language: system
entry: poetry run ruff check --fix
types: [python]
- id: mypy
name: mypy
language: system
entry: poetry run mypy
types: [python]