-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
78 lines (66 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
files: '.py'
exclude: '.git'
default_stages: [commit]
repos:
# Autoformatting (modifies staged files)
- repo: local
hooks:
- id: copyright
name: copyright
entry: python copyright.py
language: system
types: [python]
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
args: ["-l", "120", "--profile", "black"]
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
hooks:
- id: pycln
args: ["--all"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: ["-l", "120"]
# Code analysis (only checks staged files)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
hooks:
- id: mypy
name: mypy
entry: "poetry run mypy"
# language: system
# types: [python]
# require_serial: true
args: ["--show-error-codes", "--show-error-context", "--pretty", "--show-absolute-path"]
additional_dependencies: ['types-requests', 'types-attrs', 'pydantic', 'types-python-dateutil']
verbose: true
fail_fast: true
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [
"flake8-quotes==3.3.2"
]
fail_fast: true
- repo: local
hooks:
- id: endpoints-md
name: endpoints-md
entry: python endpoints-md.py
language: system
types: [python]
fail_fast: true
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets