Skip to content

Commit 3b8972c

Browse files
committed
add pre-commit hook
1 parent 583440b commit 3b8972c

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.flake8

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[flake8]
2+
max-line-length = 88
3+
select = E303,W293,W291,W292,E305,E231,E302
4+
exclude =
5+
.tox,
6+
__pycache__,
7+
*.pyc,
8+
.env
9+
venv/*
10+
.venv/*
11+
reports/*
12+
dist/*
13+
lib/*

.pre-commit-config.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: fix-byte-order-marker
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: debug-statements
9+
- id: pretty-format-json
10+
types: [text]
11+
files: \.json(.template)?$
12+
args: [ --autofix , --no-ensure-ascii, --indent=2, --no-sort-keys]
13+
- id: trailing-whitespace
14+
exclude: '(\/|^)lib\/'
15+
args: [ --markdown-linebreak-ext=md ]
16+
- repo: https://github.com/PyCQA/isort
17+
rev: 5.12.0
18+
hooks:
19+
- id: isort
20+
exclude: '(\/|^)lib\/'
21+
- repo: https://github.com/psf/black
22+
rev: 23.3.0
23+
hooks:
24+
- id: black
25+
exclude: '(\/|^)lib\/'
26+
- repo: https://github.com/PyCQA/flake8
27+
rev: 6.0.0
28+
hooks:
29+
- id: flake8

0 commit comments

Comments
 (0)