forked from TencentBlueKing/bkpaas-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
41 lines (40 loc) · 1.22 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
repos:
- repo: local
hooks:
- id: Name check
name: Check sensitive info
verbose: true
language: script
entry: pre_commit_hooks/rtx.sh
- id: IP check
name: Check sensitive info
verbose: true
language: script
entry: pre_commit_hooks/ip.sh
- id: isort
name: isort
language: python
types: [python]
pass_filenames: false
entry: isort --settings-path=pyproject.toml .
- id: black
name: black
language: python
types: [python]
pass_filenames: false
entry: black --config=pyproject.toml .
- id: flake8
name: flak8
language: python
types: [python]
pass_filenames: false
entry: pflake8 --config=pyproject.toml
# mypy hooks for each Python project, the hooks must be separated because different
# project might use their own configurations
- id: mypy-blue_krill
name: run mypy check for "blue-krill'
language: python
types: [python]
pass_filenames: false
entry: bash -c "cd sdks/blue-krill && poetry run mypy . --config-file=./pyproject.toml"
files: '^sdks/blue-krill/'