forked from NAVER-INTEL-Co-Lab/gaudi-cresset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
67 lines (59 loc) · 1.95 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
# Pre-commit is a tool to check for issues in the code at commit time.
# Visit the pre-commit documentation for the configuration options.
# https://pre-commit.com/#adding-pre-commit-plugins-to-your-project
exclude: ^third_party/
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
args: ["--fix=lf"]
- id: requirements-txt-fixer
# Ruff should be executed before other formatters.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
files: \.(json|jsx|md|mdx|yaml)$
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.1
hooks:
- id: nbqa-ruff # Run `ruff` on Jupyter Notebooks.
- id: nbqa-black # Remove later when the `ruff` auto-formatter is ready.
# - repo: local # Clear all Jupyter outputs before committing.
# hooks: # Comment this out if it is not the desired behavior.
# - id: jupyter-nb-clear-output
# name: jupyter-nb-clear-output
# types: [jupyter]
# stages: [commit]
# language: python
# entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
# additional_dependencies:
# - nbconvert