ci: Update pre-commit configurations, introduce pre-commit ci
This commit is contained in:
committed by
yangliwei
parent
c7ec0f40da
commit
bbdc71b5f1
@@ -1,25 +1,50 @@
|
|||||||
# See https://pre-commit.com for more information
|
ci:
|
||||||
# See https://pre-commit.com/hooks.html for more hooks
|
autofix_prs: true
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.5.0
|
||||||
rev: v4.5.0
|
rev: v4.5.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: check-toml
|
- id: check-toml
|
||||||
- id: check-merge-conflict
|
|
||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 24.2.0
|
rev: 24.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
|
rev: 5.13.2
|
||||||
rev: 5.13.2
|
rev: 5.13.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
args: ["--profile", "black"]
|
args: ["--profile", "black"]
|
||||||
|
- repo: https://github.com/PyCQA/docformatter
|
||||||
|
rev: v1.7.5
|
||||||
|
hooks:
|
||||||
|
- id: docformatter
|
||||||
|
additional_dependencies: [tomli]
|
||||||
|
args: [--in-place, --config, ./pyproject.toml]
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.15.0
|
rev: v3.15.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
|
- repo: https://github.com/hadialqattan/pycln
|
||||||
|
rev: v2.4.0
|
||||||
|
hooks:
|
||||||
|
- id: pycln
|
||||||
|
args:
|
||||||
|
- --config=pyproject.toml
|
||||||
|
- --all
|
||||||
|
- repo: https://github.com/adamchainz/blacken-docs
|
||||||
|
rev: 1.16.0
|
||||||
|
hooks:
|
||||||
|
- id: blacken-docs
|
||||||
|
- repo: https://github.com/pycqa/pydocstyle
|
||||||
|
rev: 6.3.0
|
||||||
|
hooks:
|
||||||
|
- id: pydocstyle
|
||||||
|
args:
|
||||||
|
- --select=D103,D200,D206,D300,D301
|
||||||
|
files: ^src/
|
||||||
|
|||||||
Reference in New Issue
Block a user