tenkan/.pre-commit-config.yaml

62 lines
1.6 KiB
YAML
Raw Normal View History

2022-01-12 21:31:56 +01:00
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/'
2022-01-12 21:31:56 +01:00
- id: name-tests-test
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
2022-04-21 17:02:40 +02:00
args:
- "--max-line-length=200"
- "--ignore=E501,W503"
2022-01-12 21:31:56 +01:00
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
name: black (python)
2022-04-21 17:02:40 +02:00
args:
- '-S'
- '-l 200'
2022-01-12 21:31:56 +01:00
- 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
2022-04-21 17:02:40 +02:00
entry: pylint --disable=E1101,E0401,C0301,W1514 --ignore=__init__.py --ignore-patterns=(.)*_test\.py,test_(.)*\.py
2022-01-12 21:31:56 +01:00
language: system
types: [python]
- id: pytest
name: Check pytest unit tests pass
entry: pytest
pass_filenames: false
language: system
types: [python]