68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
|
# Pre-commit hooks to run tests and ensure code is cleaned.
|
||
|
# See https://pre-commit.com for more information
|
||
|
---
|
||
|
repos:
|
||
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||
|
rev: v0.1.6
|
||
|
hooks:
|
||
|
- id: ruff
|
||
|
args:
|
||
|
- --fix
|
||
|
- repo: https://github.com/asottile/pyupgrade
|
||
|
rev: v3.3.1
|
||
|
hooks:
|
||
|
- id: pyupgrade
|
||
|
args: ["--keep-percent-format", "--py37-plus"]
|
||
|
- repo: https://github.com/psf/black
|
||
|
rev: 22.12.0
|
||
|
hooks:
|
||
|
- id: black
|
||
|
args: ["--target-version", "py37", "--line-length", "100"]
|
||
|
- repo: https://github.com/PyCQA/isort
|
||
|
rev: 5.11.5
|
||
|
hooks:
|
||
|
- id: isort
|
||
|
args: ["--profile", "black", "--line-length", "100"]
|
||
|
- repo: https://github.com/PyCQA/flake8
|
||
|
rev: 6.0.0
|
||
|
hooks:
|
||
|
- id: flake8
|
||
|
args: ["--max-line-length=100"]
|
||
|
- repo: https://github.com/codespell-project/codespell
|
||
|
rev: v2.2.2
|
||
|
hooks:
|
||
|
- id: codespell
|
||
|
args:
|
||
|
- --ignore-words-list=fro,hass
|
||
|
- --skip="./.*,*.csv,*.json,*.ambr"
|
||
|
- --quiet-level=2
|
||
|
exclude_types: [csv, json]
|
||
|
- repo: https://github.com/adrienverge/yamllint
|
||
|
rev: v1.32.0
|
||
|
hooks:
|
||
|
- id: yamllint
|
||
|
args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"]
|
||
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||
|
rev: v2.7.1
|
||
|
hooks:
|
||
|
- id: prettier
|
||
|
- repo: local
|
||
|
hooks:
|
||
|
- id: pylint
|
||
|
name: pylint
|
||
|
entry: pylint
|
||
|
language: system
|
||
|
types: [python]
|
||
|
require_serial: true
|
||
|
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
|
||
|
rev: v1.0.5
|
||
|
hooks:
|
||
|
- id: python-bandit-vulnerability-check
|
||
|
name: bandit
|
||
|
args: [--skip, "B101", --recursive, mylib]
|
||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||
|
rev: v4.4.0
|
||
|
hooks:
|
||
|
- id: check-executables-have-shebangs
|
||
|
stages: [manual]
|