-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
99 lines (97 loc) · 2.82 KB
/
.pre-commit-config.yaml
File metadata and controls
99 lines (97 loc) · 2.82 KB
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
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
exclude: monitor/dcgm/
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
additional_dependencies: [toml]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
types_or: [python, cython]
- repo: https://github.com/PyCQA/flake8
rev: 7.3.0
hooks:
- id: flake8
args:
[
--max-line-length=88,
--select=C,
E,
F,
W,
B,
B950,
--extend-ignore = E203,
E501,
]
types_or: [python, cython]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.5
hooks:
- id: clang-format
types_or: [c, c++, cuda, proto, textproto, java]
args: ["-fallback-style=none", "-style=file", "-i"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "pyproject.toml"]
exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$)
- repo: local
hooks:
- id: add-copyright
name: add-copyright
entry: python tools/add_copyright.py
language: python
require_serial: true
# More details about these pre-commit hooks here:
# https://pre-commit.com/hooks.html
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=5000']
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: check-yaml
exclude: ^helm-chart/templates\/.*$
- id: check-shebang-scripts-are-executable
- id: end-of-file-fixer
types_or: [c, c++, cuda, proto, textproto, proto, java, python, shell, bash]
- id: mixed-line-ending
- id: no-commit-to-branch
args: [--branch, main]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
types_or: [python, cython]
args:
[
"--explicit-package-bases",
"--ignore-missing-imports",
"--show-error-codes",
"--pretty",
"--show-column-numbers",
"--show-error-context",
"--disable-error-code",
"import-untyped",
]
exclude: |
(?x)^(
examples/.*/model\.py|
experiments/.*|
qa/.*/.*config_generator\.py|
qa/.*/check_results\.py|
setup.py|
)$