forked from openvinotoolkit/training_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
71 lines (63 loc) · 1.79 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
default_language_version:
python: python3.10
node: 16.15.0
ruby: 2.7.2
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
args: [--line-length, "120"]
files: '^(src|tests)/.*\.py'
# yaml formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
exclude: "src/otx/recipes"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.1.1"
hooks:
- id: mypy
files: '^(src)/.*\.py'
additional_dependencies: [
# numpy==1.19.5,
types-PyYAML,
attrs==21.2.*,
types-requests,
types-Deprecated,
types-docutils,
types_futures,
types-python-dateutil,
tokenize-rt==3.2.0,
]
args: [--no-strict-optional, --ignore-missing-imports]
exclude: "^src/otx/recipes"
- repo: https://github.com/AleksaC/hadolint-py
rev: v2.10.0
hooks:
- id: hadolint
name: Lint Dockerfiles
description: Runs hadolint to lint Dockerfiles
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck # TODO remove this when all shell scripts have been removed from otx
# markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
hooks:
- id: markdownlint
args: [--config=.markdownlint.yaml]
# Ruff
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.258"
hooks:
- id: ruff
exclude: "tests|src/otx/recipes"
args: [--fix]
# # Git conflict marker
# - repo: https://github.com/jumanjihouse/pre-commit-hooks
# rev: 3.0.0
# hooks:
# - id: git-check # Configure in .gitattributes