This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 211
/
.pre-commit-config.yaml
179 lines (169 loc) · 5.12 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
ci:
autofix_prs: true
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: debug-statements
- id: mixed-line-ending
args: [--fix=lf]
- id: file-contents-sorter
files: |
(?x)^(
.github/workflows/script/formatScan/nlp_dict.txt
)$
args: [--unique]
- id: end-of-file-fixer
files: (.*\.(py|md|rst|yaml|yml))$
exclude: |
(?x)^(
examples/.+
)$
- id: check-json
- id: check-yaml
exclude: |
(?x)^(
conda_meta/meta.yaml|
docker/chart/templates/pytorchjob.yaml|
docker/chart/templates/pvc.yaml|
workflows/compression_aware_training/chart/templates/workflowTemplate.yaml|
.gitpod.yml
)$
- id: requirements-txt-fixer
exclude: |
(?x)^(
examples/.+
)$
- id: trailing-whitespace
files: (.*\.(py|rst|cmake|yaml|yml))$
exclude: |
(?x)^(
examples/.+
)$
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [-w, --ignore-words=.github/workflows/script/formatScan/nlp_dict.txt]
exclude: |
(?x)^(
.+.po|.+.map|.+.js.map|.+.css.map|
.github/workflows/script/formatScan/nlp_dict.txt|
docker/third_party_programs_docker.txt|
intel_extension_for_transformers/transformers/llm/evaluation/hf_eval/datasets/cnn_validation.json|
examples/huggingface/pytorch/text-generation/inference/prompt.json|
intel_extension_for_transformers/transformers/runtime/oneDNN-THIRD-PARTY-PROGRAMS|
docker/intel-tensorflow-third-party-programs.txt|
.github/workflows/sample_data/alpaca_data_sample_45.json
)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
files: |
(?x)^(
(intel_extension_for_transformers|workflows|tests)/.*(py|yaml|yml|sh)
)$
args:
[
--license-filepath=.github/license_template.txt,
--use-current-year,
--detect-license-in-X-top-lines=40,
--skip-license-insertion-comment=Copyright,
]
- id: insert-license
files: |
(?x)^(
(intel_extension_for_transformers|workflows|tests)/.*(ts|js|cpp|hpp)
)$
args:
[
--license-filepath=.github/license_template.txt,
--use-current-year,
--detect-license-in-X-top-lines=40,
--skip-license-insertion-comment=Copyright,
--comment-style=//,
]
- id: insert-license
files: |
(?x)^(
(intel_extension_for_transformers|workflows|tests)/.*(html|svelte)
)$
args:
[
--license-filepath=.github/license_template.txt,
--use-current-year,
--detect-license-in-X-top-lines=40,
--skip-license-insertion-comment=Copyright,
--comment-style=<!--| |-->,
]
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
name: Unused noqa
# - repo: https://github.com/pycqa/isort
# rev: 5.13.2
# hooks:
# - id: isort
# args: [--profile=black, --line-length=120]
# exclude: |
# (?x)^(
# examples/.+|
# .*\__init__.py
# )$
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: "v4.0.0-alpha.8" # Use the sha / tag you want to point at
# hooks:
# - id: prettier
# args: [--print-width=120]
# types_or: [yaml, html, css, scss, javascript, json, ts]
# additional_dependencies:
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args: [
--in-place,
--wrap-summaries=0, # 0 means disable wrap
--wrap-descriptions=0, # 0 means disable wrap
--black,
--style=google,
]
exclude: |
(?x)^(
examples/.+
)$
# - repo: https://github.com/psf/black.git
# rev: 24.3.0
# hooks:
# - id: black
# files: (.*\.py)$
# args: [--line-length=120]
# exclude: |
# (?x)^(
# examples/.+
# )$
# - repo: https://github.com/asottile/blacken-docs
# rev: 1.16.0
# hooks:
# - id: blacken-docs
# args: [--line-length=120, --skip-errors]
# additional_dependencies:
# - black==24.3.0
# exclude: |
# (?x)^(
# examples/.+|
# docs/source-app
# )$
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.3.5
# hooks:
# - id: ruff
# args: [--fix, --exit-non-zero-on-fix, --no-cache]
# exclude: |
# (?x)^(
# examples/.+
# )$