Skip to content

Commit 94a3350

Browse files
committed
🔧 Simplify pre-commit hooks by switching to Ruff
Replace black, isort, and fixit with Ruff for both linting and formatting. Ruff provides equivalent functionality in a single, faster tool with both --fix and format capabilities.
1 parent 788bb42 commit 94a3350

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

.pre-commit-config.yaml

+4-16
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,12 @@ repos:
3030
hooks:
3131
- id: fix-smartquotes
3232

33-
- repo: https://github.com/psf/black
34-
rev: 24.10.0
35-
hooks:
36-
- id: black
37-
38-
- repo: https://github.com/PyCQA/isort
39-
rev: 5.13.2
40-
hooks:
41-
- id: isort
42-
args: [--profile=black]
43-
44-
- repo: https://github.com/Instagram/Fixit
45-
rev: v2.1.0
46-
hooks:
47-
- id: fixit-fix
48-
4933
# Ruff replaces flake8 and pylint and more
5034
- repo: https://github.com/charliermarsh/ruff-pre-commit
5135
rev: v0.9.2
5236
hooks:
37+
# Run the linter.
5338
- id: ruff
39+
args: [--fix]
40+
# Run the formatter.
41+
- id: ruff-format

0 commit comments

Comments
 (0)