/
.pre-commit-config.yaml
62 lines (54 loc) · 1.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
# Copyright 2022 Rafe Kaplan
# SPDX-License-Identifier: Apache-2.0
#
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
args: [
]
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [
--branch, main
]
- id: trailing-whitespace
- repo: local
hooks:
- id: sort-imports
name: sort python imports
language: system
entry: poetry run isort
types: [python]
- id: format
name: format python
language: system
entry: poetry run black
types: [python]
- id: license
name: apply licenses
language: system
entry: poetry run conhead
files: \.(py|toml|yaml)$
- id: lint
name: lint
language: system
entry: poetry run flake8
types: [python]
- id: type-check
name: type check
language: system
entry: poetry run pyright
types: [python]
- id: test
name: tests
language: system
entry: poetry run pytest
types: [python]
pass_filenames: false