forked from bitcaster-io/bitcaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
119 lines (108 loc) · 3.16 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
repos:
- repo: local
hooks:
# Configuration for black exists in pyproject.toml,
# but we let pre-commit take care of the file filtering.
- id: black
name: black
# args: [ '--check' ]
entry: black
language: python
types: [ python ]
require_serial: true
additional_dependencies: [ black ]
# Configuration for isort exists in pyproject.toml,
# but we let pre-commit take care of the file filtering.
- id: isort
name: isort
args: [ "--profile", "black" ]
entry: isort
language: python
types: [ python ]
additional_dependencies: [ isort ]
# Configuration for black exists in .flake8,
# but we let pre-commit take care of the file filtering.
- id: flake8
name: flake8
args: [ "--config", ".flake8" ]
entry: flake8
language: python
types: [ python ]
additional_dependencies: [ flake8 ]
- id: mypy
exclude: (^~.*|manage\.py|develop\.py|conftest.py)
args: [ "--config-file", ".mypy.ini" ]
require_serial: true
name: mypy
entry: mypy
language: python
types: [ python ]
stages: [ commit ]
additional_dependencies: [packaging]
# - id: mypy
# exclude: (^~.*|manage\.py|develop\.py|conftest.py)
# args: [ "--config-file", ".mypy.ini" ]
# require_serial: true
# name: mypy
# entry: mypy
# language: python
# types: [ python ]
# stages: [ commit ]
# additional_dependencies: [
# "django-stubs",
# "django-stubs-ext",
# "mypy-boto3",
# "mypy-boto3-sns",
# "boto3-stubs",
# "types-freezegun",
# "types-markdown",
# "types-python-dateutil",
# "types-redis",
# "types-requests",
# "types-s3transfer",
# ]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [ '--baseline', '.secrets.baseline' ]
exclude: (tests/.*|.*/tenant\.sql|Pipfile\.lock|.*\.js|~.gitlab-ci.yml|poetry.lock)
stages: [ push ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: debug-statements
stages: [ commit ]
- id: end-of-file-fixer
exclude: .bumpversion.cfg
stages: [ commit ]
- id: check-merge-conflict
stages: [ commit ]
- id: check-case-conflict
stages: [ commit ]
- repo: https://github.com/saxix/pch
rev: '0.1'
hooks:
- id: check-missed-migrations
args:
- src
stages: [ commit ]
additional_dependencies: [ setuptools ]
- id: check-untracked
args:
- src
- tests
stages: [ push ]
- id: check-forbidden
args:
- -p
- /\.showbrowser\(/
- -p
- /print\(111/
stages: [ commit ]
additional_dependencies: [ setuptools ]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.9' # Update me!
hooks:
- id: bandit
args: [ "-c", "bandit.yaml" ]