-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (53 loc) · 1.97 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
55 lines (53 loc) · 1.97 KB
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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v6.0.0
hooks:
# Remove unnecessary whitespace at the end of lines:
# - id: trailing-whitespace
# Ensure that text files have a newline at the end:
# - id: end-of-file-fixer
# Verify that Python source code is valid:
- id: check-ast
# Ensure filenames won't have conflicts on case insensitive platforms:
- id: check-case-conflict
# Check JSON files for valid syntax:
- id: check-json
# Check XML files for valid syntax:
- id: check-xml
# Check YAML files for valid syntax:
# --unsafe allows !!python/name tags used by mkdocs superfences for mermaid
- id: check-yaml
args: [--unsafe]
# Check TOML files for valid syntax:
- id: check-toml
# Check that there are no remnants of merge conflicts in files:
- id: check-merge-conflict
# Check that symlinks are valid:
- id: check-symlinks
# Check that there's no code before a docstring
- id: check-docstring-first
# Check that too large of files are not committed (50MB):
- id: check-added-large-files
args: ["--maxkb=100000"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.21
hooks:
- id: ruff
args: ["--config", "pyproject.toml"]
types_or: [python]
exclude: "^(pysuperfish/_version.py)$"
- id: ruff-format
args: ["--config", "pyproject.toml"]
types_or: [python]
exclude: "^(pysuperfish/_version.py)$"
# - repo: local
# hooks:
# - id: jupyter-notebook-clear-output
# name: jupyter-notebook-jupyter-clear
# files: \.ipynb$
# stages: [pre-commit]
# language: system
# entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
# # exclude: "^.*().ipynb$"