Skip to content

Commit 920ae71

Browse files
committed
Add pre-commit configuration and include pre-commit in development dependencies
1 parent 4279254 commit 920ae71

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
# Ruff version.
4+
rev: v0.12.2
5+
hooks:
6+
# Run the linter.
7+
- id: ruff-check
8+
args: [ --fix ]
9+
# Run the formatter.
10+
- id: ruff-format

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ plotpy-benchmarks = "plotpy.tests.benchmarks:run"
5858

5959
[project.optional-dependencies]
6060
qt = ["PyQt5>5.15.5"]
61-
dev = ["build", "babel", "Coverage", "Cython>=3.0", "pylint", "ruff"]
61+
dev = ["build", "babel", "Coverage", "Cython>=3.0", "pylint", "ruff", "pre-commit"]
6262
doc = [
6363
"sphinx",
6464
"myst_parser",

0 commit comments

Comments
 (0)