-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
70 lines (64 loc) · 2.23 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
exclude: ^(\.eggs|\.git|\.idea|\.mypy_cache|\.nox|\.tox|\.venv|_build|build|dist)/
repos:
# - repo: https://github.com/pre-commit/pre-commit-hooks
# rev: v3.1.0
# hooks:
# - id: check-byte-order-marker
# - id: check-case-conflict
# - id: check-docstring-first
# - id: check-json
# - id: check-merge-conflict
# - id: check-symlinks
# - id: check-toml
# - id: check-yaml
# - id: detect-private-key
- repo: local
hooks:
# based on pre-commit hook from https://github.com/timothycrosley/isort
- id: isort
name: isort
entry: poetry run isort
language: python
types: [python]
require_serial: true
# based on pre-commit hook from https://github.com/psf/black
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: poetry run black
language: python
language_version: python3
types: [python]
require_serial: true
# based on pre-commit hook from https://github.com/life4/flakehell
- id: flakehell
name: flakehell
description: '`flakehell` is a `flake8` wrapper to make a nice, legacy-friendly, configurable command-line utility for enforcing style consistency across Python projects.'
entry: poetry run flakehell lint
language: python
types: [file, text]
files: \.(ipynb|md|py|rst|yaml|yml)$
require_serial: true
# based on pre-commit hook from https://github.com/PyCQA/doc8
- id: doc8
name: doc8
description: This hook runs doc8 for linting docs
entry: poetry run doc8
language: python
files: \.rst$
# based on pre-commit hook from https://github.com/PyCQA/pylint
- id: pylint
name: pylint
entry: poetry run pylint
language: python
types: [python]
require_serial: true
stages: [manual]
# based on pre-commit hook from https://github.com/PyCQA/bandit
- id: bandit
name: bandit
description: 'Bandit is a tool for finding common security issues in Python code'
entry: poetry run bandit
language: python
types: [python]
stages: [manual]