61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.1.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-json
|
|
- id: check-added-large-files
|
|
- id: double-quote-string-fixer
|
|
- id: fix-encoding-pragma
|
|
- id: no-commit-to-branch
|
|
exclude: 'data/tests/'
|
|
- id: name-tests-test
|
|
- repo: https://gitlab.com/pycqa/flake8
|
|
rev: 3.9.2
|
|
hooks:
|
|
- id: flake8
|
|
args:
|
|
- "--max-line-length=200"
|
|
- "--ignore=E501,W5O3"
|
|
- repo: https://github.com/psf/black
|
|
rev: 21.12b0
|
|
hooks:
|
|
- id: black
|
|
name: black (python)
|
|
args:
|
|
- '-S'
|
|
- '-l 200'
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v0.931
|
|
hooks:
|
|
- id: mypy
|
|
additional_dependencies: [pydantic] # add if use pydantic
|
|
- repo: https://github.com/PyCQA/isort
|
|
rev: 5.10.1
|
|
hooks:
|
|
- id: isort
|
|
name: isort (python)
|
|
args: ['--profile', 'black']
|
|
- repo: https://github.com/PyCQA/bandit
|
|
rev: 1.7.1
|
|
hooks:
|
|
- id: bandit
|
|
exclude: ^tests/
|
|
- repo: https://github.com/asottile/pyupgrade
|
|
rev: v2.31.0
|
|
hooks:
|
|
- id: pyupgrade
|
|
- repo: local
|
|
hooks:
|
|
- id: pylint
|
|
name: pylint
|
|
entry: pylint --disable=E1101,E0401,C0301,W1514 --ignore=__init__.py --ignore-patterns=(.)*_test\.py,test_(.)*\.py
|
|
language: system
|
|
types: [python]
|
|
- id: pytest
|
|
name: Check pytest unit tests pass
|
|
entry: pytest
|
|
pass_filenames: false
|
|
language: system
|
|
types: [python]
|