80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
# 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:
|
|
# python
|
|
- id: check-ast
|
|
- id: check-builtin-literals
|
|
- id: check-docstring-first
|
|
- id: debug-statements
|
|
- id: fix-encoding-pragma
|
|
args: [--remove]
|
|
|
|
# text
|
|
- id: check-executables-have-shebangs
|
|
- id: check-merge-conflict
|
|
- id: check-shebang-scripts-are-executable
|
|
- id: detect-private-key
|
|
- id: end-of-file-fixer
|
|
- id: fix-byte-order-marker
|
|
- id: mixed-line-ending
|
|
args: [--fix=lf]
|
|
- id: trailing-whitespace
|
|
|
|
# yaml
|
|
- id: check-yaml
|
|
|
|
# python
|
|
- repo: https://github.com/pre-commit/mirrors-isort
|
|
rev: v5.10.1
|
|
hooks:
|
|
- id: isort
|
|
args: [--profile, black]
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v1.4.1
|
|
hooks:
|
|
- id: mypy
|
|
additional_dependencies: [types-all]
|
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
rev: v1.10.0
|
|
hooks:
|
|
- id: python-check-blanket-type-ignore
|
|
- id: python-no-eval
|
|
- id: python-use-type-annotations
|
|
- repo: https://github.com/asottile/dead
|
|
rev: v1.5.2
|
|
hooks:
|
|
- id: dead
|
|
args: []
|
|
- repo: https://github.com/asottile/pyupgrade
|
|
rev: v3.9.0
|
|
hooks:
|
|
- id: pyupgrade
|
|
args: [--py38-plus]
|
|
- repo: https://github.com/psf/black/
|
|
rev: 23.7.0
|
|
hooks:
|
|
- id: black
|
|
language_version: python3.11
|
|
args: [--line-length, '100']
|
|
- repo: https://github.com/PyCQA/bandit
|
|
rev: 1.7.5
|
|
hooks:
|
|
- id: bandit
|
|
args: [--severity-level, medium]
|
|
- repo: https://github.com/PyCQA/flake8
|
|
rev: 6.0.0
|
|
hooks:
|
|
- id: flake8
|
|
additional_dependencies: [flake8-typing-imports==1.12.0]
|
|
args: [--max-line-length, '100']
|
|
|
|
# yaml
|
|
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
|
|
rev: 0.2.3
|
|
hooks:
|
|
- id: yamlfmt
|
|
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '100', --implicit_start]
|