-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
79 lines (78 loc) · 2.13 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
minimum_pre_commit_version: 3.7.0
fail_fast: true
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args:
- --allow-multiple-documents
- id: check-merge-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- id: name-tests-test
- id: fix-encoding-pragma
args:
- --remove
- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
hooks:
- id: check-json5
- repo: local
hooks:
- id: black
name: black
entry: poetry run black
args: ["--check"]
language: python
types_or: [python, pyi]
require_serial: true
- id: ruff
name: ruff
entry: poetry run ruff check
args: ["--force-exclude"]
language: python
types_or: [python, pyi]
require_serial: true
- id: mypy
name: mypy
entry: poetry run mypy
args: ["--ignore-missing-imports", "--scripts-are-modules"]
language: python
types_or: [python, pyi]
require_serial: true
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
alias: prettier-check
name: prettier (JSON, Markdown & YAML)
entry: prettier --check --ignore-unknown
files: "\\.(json|md|yaml|yml)$"
- repo: https://github.com/python-poetry/poetry
rev: 1.8.3
hooks:
- id: poetry-install
name: poetry install
args:
- --with
- dev
- --sync
- repo: local
hooks:
- id: forbid-yml-file
name: no .yml extension
entry: Yaml file must have the .yaml extension
language: fail
files: ".*\\.yml"