-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.pre-commit-config.yaml
37 lines (37 loc) · 1.35 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: fix-encoding-pragma
name: Add -*- coding utf-8 -*- to the top of python files.
- id: trailing-whitespace
name: Check for trailing whitespace (auto-fixes)
- id: end-of-file-fixer
name: Check for a blank line at the end of scripts (auto-fixes)
- id: check-added-large-files
name: Check for files larger than 5 MB
args: [ "--maxkb=5120" ]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: Sort Python imports (auto-fixes)
args: [ "--profile", "black" ]
files: \.py$
- repo: https://github.com/psf/black
rev: 23.3.0 # Replace by any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
name: Consistent Python code formatting (auto-fixes)
language: python
language_version: python3 # Should be a command that runs python3.6+
args: [--line-length=79]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
name: detect-secrets - Detect secrets in staged code
args: [ "--baseline", ".secrets.baseline"]
exclude: .*/tests/.*