Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
76 lines (70 loc) · 2.25 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
76 lines (70 loc) · 2.25 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
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright (c) 2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# NOTE: This file has been modified by Intel Corporation.
repos:
- repo: local
hooks:
- id: fix-copyright-headers
name: fix missing SPDX copyright headers
entry: python3 .github/scripts/check_licenses.py --fix
language: system
files: '\.(py|md|html|yaml|yml|toml|ini|cfg)$'
pass_filenames: true
- id: regenerate-uv-lock
name: regenerate uv.lock
entry: uv lock
language: system
files: 'pyproject.toml'
pass_filenames: false
- repo: https://github.com/astral-sh/ruff-pre-commit
# Keep this rev equal to the ruff pin in pyproject.toml. Lint fails when they differ.
rev: v0.17.1
hooks:
- id: ruff-check
args: [ --fix ]
types_or: [ python, pyi ]
- id: ruff-format
types_or: [ python, pyi ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: detect-private-key
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
types: [python]
- id: fix-byte-order-marker
- id: no-commit-to-branch
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: 'setup.cfg|tests/assets/reports/.*\.txt'
- id: mixed-line-ending
args: [--fix=lf]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.0
hooks:
- id: check-dependabot
- id: check-github-workflows
# - repo: https://github.com/thlorenz/doctoc
# rev: v2.2.0
# hooks:
# - id: doctoc
# args: [ --github, --update-only ]
- repo: https://github.com/kynan/nbstripout
rev: 0.9.1
hooks:
- id: nbstripout
- repo: https://github.com/PyCQA/bandit
rev: 1.9.4
hooks:
- id: bandit
# Skip B101 (assert_used): assertions are expected in tests; all other checks run.
args: ["-s", "B101", "-x", "/.venv/"]