Skip to content

Commit 9cb1dc9

Browse files
authored
fix: reduce number of commit hooks to minimum
1 parent d43642f commit 9cb1dc9

File tree

2 files changed

+51
-47
lines changed

2 files changed

+51
-47
lines changed

.pre-commit-config.yaml

Lines changed: 27 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,41 @@
1-
ci:
2-
autoupdate_schedule: monthly
3-
autoupdate_commit_msg: "chore: update pre-commit hooks"
4-
51
repos:
6-
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.5.0
2+
- repo: "https://github.com/psf/black"
3+
rev: "22.3.0"
84
hooks:
9-
- id: check-case-conflict
10-
- id: check-ast
11-
- id: check-docstring-first
12-
- id: check-executables-have-shebangs
13-
- id: check-added-large-files
14-
- id: check-case-conflict
15-
- id: check-merge-conflict
16-
- id: check-json
17-
- id: check-toml
18-
- id: check-yaml
19-
- id: debug-statements
20-
- id: end-of-file-fixer
21-
- id: trailing-whitespace
5+
- id: black
226

23-
- repo: https://github.com/python-jsonschema/check-jsonschema
24-
rev: 0.27.1
7+
- repo: "https://github.com/kynan/nbstripout"
8+
rev: "0.5.0"
259
hooks:
26-
- id: check-github-workflows
10+
- id: nbstripout
2711

28-
- repo: https://github.com/executablebooks/mdformat
29-
rev: 0.7.17
12+
- repo: "https://github.com/pre-commit/mirrors-prettier"
13+
rev: "v2.7.1"
3014
hooks:
31-
- id: mdformat
15+
- id: prettier
16+
exclude: tests\/test_.+\.
3217

33-
- repo: https://github.com/pre-commit/mirrors-prettier
34-
rev: "v3.0.3"
18+
- repo: https://github.com/charliermarsh/ruff-pre-commit
19+
rev: "v0.0.215"
3520
hooks:
36-
- id: prettier
37-
types_or: [yaml, html, json]
21+
- id: ruff
3822

39-
- repo: https://github.com/codespell-project/codespell
40-
rev: "v2.2.6"
23+
- repo: https://github.com/PyCQA/doc8
24+
rev: "v1.1.1"
4125
hooks:
42-
- id: codespell
43-
args: ["-L", "sur,nd"]
26+
- id: doc8
4427

45-
- repo: https://github.com/pre-commit/pygrep-hooks
46-
rev: "v1.10.0"
28+
- repo: https://github.com/codespell-project/codespell
29+
rev: v2.2.4
4730
hooks:
48-
- id: rst-backticks
49-
- id: rst-directive-colons
50-
- id: rst-inline-touching-normal
31+
- id: codespell
32+
stages: [commit]
33+
additional_dependencies:
34+
- tomli
5135

52-
- repo: https://github.com/astral-sh/ruff-pre-commit
53-
rev: v0.1.5
36+
# Prevent committing inline conflict markers
37+
- repo: https://github.com/pre-commit/pre-commit-hooks
38+
rev: v4.3.0
5439
hooks:
55-
- id: ruff
56-
types_or: [python, jupyter]
57-
args: ["--fix", "--show-fixes"]
58-
- id: ruff-format
59-
types_or: [python, jupyter]
40+
- id: check-merge-conflict
41+
args: [--assume-in-merge]

pyproject.toml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,27 @@ filterwarnings = [
103103
"module:datetime.datetime.utc:DeprecationWarning"
104104
]
105105

106-
[tool.repo-review]
107-
ignore = ["GH102", "MY100", "RF001", "PY007", "GH103", "PC140"]
106+
[tool.ruff]
107+
ignore-init-module-imports = true
108+
fix = true
109+
select = ["E", "F", "W", "I", "D", "RUF"]
110+
ignore = [
111+
"E501", # line too long | Black take care of it
112+
"W605", # invalid escape sequence | we escape specific characters for sphinx
113+
"D212", # Multi-line docstring | we use a different convention, too late
114+
"D101", # Missing docstring in public class | we use a different convention, too late
115+
]
116+
117+
[tool.ruff.flake8-quotes]
118+
docstring-quotes = "double"
119+
120+
[tool.ruff.pydocstyle]
121+
convention = "google"
122+
123+
[tool.black]
124+
line-length = 100
125+
126+
[tool.doc8]
127+
ignore = [
128+
"D001" # we follow a 1 line = 1 paragraph style
129+
]

0 commit comments

Comments
 (0)