Skip to content

Commit 3812a44

Browse files
committed
Replace black with ruff
1 parent 00cebac commit 3812a44

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
repos:
2-
-
3-
repo: 'https://github.com/ambv/black'
4-
# 18.6b1
5-
rev: 22.3.0
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.14.10
64
hooks:
7-
- id: black
8-
args: ['--safe']
9-
-
10-
repo: 'https://github.com/PyCQA/flake8'
11-
rev: 5.0.4
12-
hooks:
13-
- id: flake8
14-
args: [
15-
# E501 let black handle all line length decisions
16-
# W503 black conflicts with "line break before operator" rule
17-
# E203 black conflicts with "whitespace before ':'" rule
18-
# E231 black conflicts with "whitespace after ':'" rule
19-
# E722 bare excepts need to be addressed
20-
'--ignore=E501,W503,E203,E722,E231']
5+
- id: ruff
6+
- id: ruff-format

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,13 @@ dev = [
4848
"pytest-cov>=4",
4949
"build>=1.2",
5050
"pre-commit>=3.5",
51-
"black==22.3.0",
51+
"ruff>=0.14.10",
52+
]
53+
54+
[tool.ruff.lint]
55+
ignore = [
56+
"E203", # whitespace before ':'
57+
"E231", # missing whitespace after ',', ';', or ':'
58+
"E501", # line too long
59+
"E722" # bare except
5260
]

0 commit comments

Comments
 (0)