Skip to content

Commit ba34960

Browse files
committed
Use ruff in place of black and reorder-python-imports
Unfortunately black and reorder-python-imports are no longer compatible between each other: asottile/reorder-python-imports#367 asottile/reorder-python-imports#366 psf/black#4175 Take this opportunity to try out ruff.
1 parent 3d48ff9 commit ba34960

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
exclude: '^($|.*\.bin)'
22
repos:
3-
- repo: https://github.com/psf/black
4-
rev: 23.11.0
5-
hooks:
6-
- id: black
7-
args: [--safe, --quiet]
83
- repo: https://github.com/pre-commit/pre-commit-hooks
94
rev: v4.5.0
105
hooks:
@@ -18,11 +13,12 @@ repos:
1813
files: ^(CHANGELOG.rst|README.rst|HOWTORELEASE.rst|changelog/.*)$
1914
language: python
2015
additional_dependencies: [pygments, restructuredtext_lint]
21-
- repo: https://github.com/asottile/reorder-python-imports
22-
rev: v3.12.0
16+
- repo: https://github.com/astral-sh/ruff-pre-commit
17+
rev: v0.1.14
2318
hooks:
24-
- id: reorder-python-imports
25-
args: ['--application-directories=.:src']
19+
- id: ruff
20+
args: [ --fix ]
21+
- id: ruff-format
2622
- repo: https://github.com/pre-commit/mirrors-mypy
2723
rev: v1.7.1
2824
hooks:

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"setuptools-scm[toml]",
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
[tool.ruff]

0 commit comments

Comments
 (0)