Skip to content

Commit ff34f1b

Browse files
Merge pull request #3479 from AI-Hypercomputer:igorts/precommit
PiperOrigin-RevId: 888400050
2 parents 61fa4f3 + f63707e commit ff34f1b

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
files: ^(.*\.(py|md|sh|yaml|yml|in|cfg|txt|rst|toml|precommit-toml|wordlist))$
33
exclude: ^(\.[^/]*(cache|assets|uv|venv)/.*)$
44
repos:
5+
- repo: https://github.com/Lucas-C/pre-commit-hooks
6+
rev: v1.5.5
7+
hooks:
8+
- id: insert-license
9+
name: Add license for all Python files
10+
files: \.py$|\.bzl$|BUILD$|BUILD\.bazel$
11+
args:
12+
- --comment-style
13+
- "|#|"
14+
- --license-filepath
15+
- LICENSE_HEADER
16+
- --use-current-year
17+
- --allow-past-years
18+
519
- repo: https://github.com/codespell-project/codespell
620
rev: v2.4.1
721
hooks:
@@ -52,7 +66,6 @@ repos:
5266
args:
5367
- '--pyink-indentation=2'
5468
- '--line-length=122'
55-
- '--check'
5669

5770
- repo: https://github.com/executablebooks/mdformat
5871
rev: 0.7.22

LICENSE_HEADER

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2023–2026 Google LLC
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
https://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

0 commit comments

Comments
 (0)