-
Notifications
You must be signed in to change notification settings - Fork 13
/
.pre-commit-config.yaml
116 lines (116 loc) · 3.15 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
exclude: ^(.*egg.info.*|.*/parameters.py$|.*\.py_template|.*/experimental/.*|.*/fixtures/.*|docs/source/_themes/.*|.*\.patch)
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
args:
- --py38-plus
- --keep-runtime-typing
- repo: https://github.com/PyCQA/isort # config: .isort.cfg
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args:
- --safe
- --line-length=120
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude_types:
- image
exclude: >
(?x)^(
license_header.txt|
tests/resources/.*|
)$
- id: check-yaml
- id: debug-statements
- id: check-ast
- id: check-json
exclude: (?x)^(\.vscode\-bootstrap/.*\.json)$
- id: pretty-format-json
args:
- --autofix
exclude_types:
- jupyter
exclude: (?x)^(\.vscode\-bootstrap/.*\.json)$
- repo: https://github.com/pycqa/flake8 # config: .flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear == 23.9.16
- flake8-init-return == 1.0.0
- flake8-print == 5.0.0
- repo: https://github.com/terrencepreilly/darglint
rev: v1.7.0
hooks:
- id: darglint
language_version: python3
# Exclude test files.
exclude: ^.*(_test.py)$
- repo: https://github.com/igorshubovych/markdownlint-cli # config: .markdownlint.yaml
rev: v0.36.0
hooks:
- id: markdownlint-fix
language_version: 16.20.2
- repo: https://github.com/keith/pre-commit-buildifier
rev: 7.3.1
hooks:
- id: buildifier
args:
- --warnings=all
files: \.(bzl|bazel|sky)$
exclude: >
(?x)^(
snowflake/ml/requirements.bzl
)$
# - id: buildifier-lint
# args: *args
- repo: https://github.com/crate-ci/typos # config: _typos.toml
rev: v1.16.10
hooks:
- id: typos
exclude_types:
- image
- repo: https://github.com/lyz-code/yamlfix
rev: 1.16.1
hooks:
- id: yamlfix
args:
- --config-file
- yamlfix.toml
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
args:
- --severity=warning
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.26.3
hooks:
- id: check-jsonschema
files: ^requirements.*\.yml$
args:
- --schemafile
- bazel/requirements/requirements.schema.json
- id: check-github-workflows
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods