-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
62 lines (59 loc) · 1.76 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: ^simple_syslog/generated/
- id: trailing-whitespace
exclude: ^simple_syslog/generated/
- repo: local
hooks:
- id: black
exclude: ^simple_syslog/generated/
name: black
entry: poetry run black
language: system
types: [ python ]
- id: flake8
exclude: ^simple_syslog/generated/
name: flake8
entry: poetry run flake8
language: system
types: [ python ]
- id: isort
exclude: ^simple_syslog/generated/
name: isort (python)
entry: poetry run isort
language: system
types: [ python ]
- id: autoflake
name: autoflake
types: [ python ]
exclude: ^simple_syslog/generated/
entry: poetry run autoflake
language: system
- id: poetry-check
name: poetry-check
description: run poetry check to validate config
entry: poetry check
language: python
language_version: python3
pass_filenames: false
files: ^pyproject.toml$
- id: poetry-lock
name: poetry-lock
description: run poetry lock to update lock file
entry: poetry lock
language: python
language_version: python3
pass_filenames: false
- id: poetry-export
name: poetry-export
description: run poetry export to sync lock file with requirements.txt
entry: poetry export
language: python
language_version: python3
pass_filenames: false
files: ^poetry.lock$
args: [ "-f", "requirements.txt", "-o", "requirements.txt" ]