-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
44 lines (43 loc) · 1.16 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
repos:
# General pre-commits
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: detect-private-key
description: "Check accidental private keys in code"
- id: requirements-txt-fixer
description: "Sort requirements alphabetically"
- id: trailing-whitespace
description: "Remove trailing whitespaces"
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 'v1.10.0'
hooks:
- id: python-no-eval
# For python files
- repo: https://github.com/psf/black
# Code style
rev: 23.10.1
hooks:
- id: black
# Same tool but for Jupyter notebooks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: nbqa-black
name: nbqa-black
description: "Run 'black' on a Jupyter Notebook"
language: python
require_serial: true
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Fast linter to replace flake8
rev: 'v0.1.4'
hooks:
- id: ruff
fail_fast: true
- repo: local
hooks:
- id: cargofmt
name: cargofmt
entry: rustfmt
files: \.rs$
language: system