88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
default_language_version:
|
|
python: python3.8
|
|
|
|
ci:
|
|
autofix_prs: true
|
|
autoupdate_schedule: weekly
|
|
autofix_commit_msg: "fix(pre_commit): 🎨 auto format pre-commit hooks"
|
|
autoupdate_commit_msg: "chore(pre_commit): ⬆ pre_commit autoupdate"
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.4.0
|
|
hooks:
|
|
- id: end-of-file-fixer
|
|
- id: trailing-whitespace
|
|
- id: check-yaml
|
|
- id: check-docstring-first
|
|
- id: check-executables-have-shebangs
|
|
- id: check-toml
|
|
- id: check-case-conflict
|
|
- id: check-added-large-files
|
|
args: ['--maxkb=2048']
|
|
exclude: ^logo/
|
|
- id: detect-private-key
|
|
- id: forbid-new-submodules
|
|
- id: pretty-format-json
|
|
args: ['--autofix', '--no-sort-keys', '--indent=4']
|
|
- id: end-of-file-fixer
|
|
- id: mixed-line-ending
|
|
|
|
# - repo: https://github.com/asottile/pyupgrade
|
|
# rev: v3.9.0
|
|
# hooks:
|
|
# - id: pyupgrade
|
|
# name: Upgrade code
|
|
# args: [--py38-plus]
|
|
|
|
- repo: https://github.com/PyCQA/isort
|
|
rev: 5.12.0
|
|
hooks:
|
|
- id: isort
|
|
name: Sort imports
|
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
|
rev: 0.7.16
|
|
hooks:
|
|
- id: mdformat
|
|
name: MD formatting
|
|
additional_dependencies:
|
|
- mdformat-gfm
|
|
- mdformat-black
|
|
exclude: "README.md|CITATION|CONTRIBUTING.md"
|
|
|
|
# - repo: https://github.com/PyCQA/flake8
|
|
# rev: 6.0.0
|
|
# hooks:
|
|
# - id: flake8
|
|
# name: PEP8 Max Line Length Check
|
|
# args:
|
|
# - --count --max-line-length=88 --exit-zero --ignore=D --extend-ignore=E203,E501,W503 --statistics
|
|
|
|
|
|
# - repo: https://github.com/PyCQA/flake8
|
|
# rev: 6.0.0
|
|
# hooks:
|
|
# - id: flake8
|
|
# name: PEP8
|
|
# args:
|
|
# - --count --max-line-length=88 --select=E9,F63,F7,F82 --show-source --statistics
|
|
|
|
- repo: https://github.com/PyCQA/bandit
|
|
rev: '1.7.5'
|
|
hooks:
|
|
- id: bandit
|
|
args: ["-c", "pyproject.toml"]
|
|
additional_dependencies: ["bandit[toml]"]
|
|
|
|
# - repo: https://github.com/PyCQA/autoflake
|
|
# rev: v2.2.0
|
|
# hooks:
|
|
# - id: autoflake
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.0.280
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix, --exit-non-zero-on-fix]
|