Skip to content

Commit 1d0f606

Browse files
authored
chore: replace isort, black, pyupgrade and autoflake with ruff (#214)
1 parent ba1153e commit 1d0f606

File tree

5 files changed

+38
-312
lines changed

5 files changed

+38
-312
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,17 @@ repos:
99
- id: mixed-line-ending
1010
args: ["--fix=lf"]
1111

12-
- repo: https://github.com/pycqa/isort
13-
rev: 6.0.0
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
# Ruff version.
14+
rev: v0.12.1
1415
hooks:
15-
- id: isort
16-
args:
17-
[
18-
"--profile",
19-
"black",
20-
"--multi-line=3",
21-
"--trailing-comma",
22-
"--force-grid-wrap=0",
23-
"--use-parentheses",
24-
"--line-width=88",
25-
]
26-
27-
- repo: https://github.com/myint/autoflake.git
28-
rev: v2.3.1
29-
hooks:
30-
- id: autoflake
31-
args:
32-
[
33-
"--in-place",
34-
"--remove-all-unused-imports",
35-
"--ignore-init-module-imports",
36-
]
37-
38-
- repo: https://github.com/psf/black
39-
rev: "24.4.0"
40-
hooks:
41-
- id: black
42-
43-
- repo: https://github.com/asottile/pyupgrade
44-
rev: v3.15.1
45-
hooks:
46-
- id: pyupgrade
47-
args: ["--py37-plus", "--keep-runtime-typing"]
16+
# Run the linter.
17+
- id: ruff
18+
types_or: [ python, pyi ]
19+
args: [ --fix ]
20+
# Run the formatter.
21+
- id: ruff-format
22+
types_or: [ python, pyi ]
4823

4924
- repo: https://github.com/commitizen-tools/commitizen
5025
rev: v3.22.0

0 commit comments

Comments
 (0)