mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-21 14:17:11 +08:00
add pre-commit hook
This commit is contained in:
13
.flake8
Normal file
13
.flake8
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[flake8]
|
||||||
|
max-line-length = 88
|
||||||
|
select = E303,W293,W291,W292,E305,E231,E302
|
||||||
|
exclude =
|
||||||
|
.tox,
|
||||||
|
__pycache__,
|
||||||
|
*.pyc,
|
||||||
|
.env
|
||||||
|
venv/*
|
||||||
|
.venv/*
|
||||||
|
reports/*
|
||||||
|
dist/*
|
||||||
|
lib/*
|
||||||
29
.pre-commit-config.yaml
Normal file
29
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.4.0
|
||||||
|
hooks:
|
||||||
|
- id: fix-byte-order-marker
|
||||||
|
- id: check-case-conflict
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: debug-statements
|
||||||
|
- id: pretty-format-json
|
||||||
|
types: [text]
|
||||||
|
files: \.json(.template)?$
|
||||||
|
args: [ --autofix , --no-ensure-ascii, --indent=2, --no-sort-keys]
|
||||||
|
- id: trailing-whitespace
|
||||||
|
exclude: '(\/|^)lib\/'
|
||||||
|
args: [ --markdown-linebreak-ext=md ]
|
||||||
|
- repo: https://github.com/PyCQA/isort
|
||||||
|
rev: 5.12.0
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
exclude: '(\/|^)lib\/'
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 23.3.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
exclude: '(\/|^)lib\/'
|
||||||
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
rev: 6.0.0
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
Reference in New Issue
Block a user