Skip to content

Commit 938e3f1

Browse files
authored
Add pre-commit hooks "check-toml" and "isort" (#306)
1 parent 5a47e9b commit 938e3f1

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ repos:
3030
Zip files are not allowed in the repository as they are hard to
3131
track and have security implications. Please remove the zip file from the repository.
3232
files: \.zip$
33+
- repo: https://github.com/pycqa/isort
34+
rev: 7.0.0
35+
hooks:
36+
- id: isort
37+
name: run isort
38+
description: A Python utility / library to sort imports.
3339
- repo: https://github.com/psf/black
3440
rev: 25.1.0
3541
hooks:
@@ -48,6 +54,8 @@ repos:
4854
description: Attempts to load all json files to verify syntax.
4955
- id: check-merge-conflict
5056
description: Check for files that contain merge conflict strings.
57+
- id: check-toml
58+
description: Attempts to load all TOML files to verify syntax.
5159
- id: check-vcs-permalinks
5260
description: Ensures that links to vcs websites are permalinks.
5361
- id: check-yaml

doc/generate_commits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import subprocess
21
import json
32
import os
3+
import subprocess
44
import sys
55

66

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tool.isort]
2+
profile = "black"

0 commit comments

Comments
 (0)