-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
132 lines (116 loc) · 2.96 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
fail_fast: false
repos:
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.15.0
# hooks:
# - id: pyupgrade
# args:
# - --keep-runtime-typing
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
args:
- --config=pyproject.toml
- repo: https://github.com/myint/autoflake
rev: v2.2.1
hooks:
- id: autoflake
exclude: .*/__init__.py
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-use-type-annotations
- id: python-check-blanket-noqa
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: ruff
args:
- --config
- ./pyproject.toml
- --fix
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
types:
- python
args:
- -c
- pyproject.toml
additional_dependencies:
- toml
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
hooks:
- id: mypy
additional_dependencies:
- pydantic~=1.10.13
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-symlinks
- id: check-toml
- id: debug-statements
- id: no-commit-to-branch
args:
- --branch
- master
- repo: local
hooks:
- id: poetry-lock
name: poetry-lock
description: run poetry install to install dependencies from the lock file
entry: poetry lock
args:
- --no-update
language: python
pass_filenames: false
files: pyproject.toml
- id: poetry-install
name: poetry-install
description: run poetry install to install dependencies from the lock file
entry: poetry install
args:
- --no-root
language: python
pass_filenames: false
stages: [post-checkout, post-merge]
always_run: true
- id: poetry-export
name: poetry-export
entry: poetry export
args:
- -f
- requirements.txt
- -o requirements.txt
language: python
pass_filenames: false
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
hooks:
- id: pretty-format-yaml
args:
- --autofix
- --offset
- '2'
- --indent
- '2'
- id: pretty-format-toml
args: [--autofix]
files: toml