-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
32 lines (30 loc) · 1 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
# 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.
- 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
- --