-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
33 lines (31 loc) · 1.05 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
# This file contains the configuration for pre commit hooks used to sanitise the repository.
repos:
# General pre-commit hooks to stop bad things happening.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-case-conflict # Ensure we don't have case clashes in the repository.
# Large file check is broken.
#- id: check-added-large-files # Prevent large files from being added to the repository.
# Linting and formatting for Python.
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.0
hooks:
# # Run the linter.
# - id: ruff
# args: [ --fix ]
# Run the formatter.
- id: ruff-format
# Sanitise Jupyter notebooks.
- repo: https://github.com/srstevenson/nb-clean
rev: 3.3.0
hooks:
- id: nb-clean
args:
- --remove-empty-cells
- --preserve-cell-metadata
- tags
- -M
- --