-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
84 lines (79 loc) · 2.29 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# To install the git pre-commit hook run:
# pre-commit install
# To update the pre-commit hooks run:
# pre-commit autoupdate
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: end-of-file-fixer
- id: debug-statements
- id: check-yaml
name: Check YAML
- id: check-toml
name: Check TOML
- id: requirements-txt-fixer
name: Fix requirements*.txt
files: ^requirements.*\.txt$
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files", "--skip-gitignore"]
- repo: https://github.com/ambv/black
rev: 21.12b0
hooks:
- id: black
- repo: https://github.com/PyCQA/bandit
rev: 1.7.2
hooks:
- id: bandit
args: ["-r"]
files: ^oteapi_asmod/.*$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
exclude: ^tests/.*$
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
args:
- "--rcfile=pyproject.toml"
- "--extension-pkg-whitelist='pydantic'"
language: python
types: [python]
require_serial: true
files: ^.*$
exclude: ^tests/.*$
- id: pylint-tests
name: pylint - tests
entry: pylint
args:
- "--rcfile=pyproject.toml"
- "--extension-pkg-whitelist='pydantic'"
- "--disable=import-outside-toplevel,redefined-outer-name"
language: python
types: [python]
require_serial: true
files: ^tests/.*$
- id: update-docs-api-reference
name: Update API Reference in Documentation
entry: invoke
args: [create-api-reference-docs, --pre-clean, --pre-commit]
language: python
pass_filenames: false
files: ^oteapi_asmod/.*\.py$
description: Update the API Reference documentation, whenever a Python file is touched in the code base.
- id: update-docs-index
name: Update Landing Page for Documentation
entry: invoke
args: [create-docs-index]
language: python
pass_filenames: false
files: ^README.md$
description: Update the landing page for the documentation if the source file (README.md) is changed.