Skip to content

Commit dfcccb0

Browse files
committed
trade out isort, black, and flake-8 for ruff
1 parent 300313e commit dfcccb0

File tree

3 files changed

+1304
-17
lines changed

3 files changed

+1304
-17
lines changed

pyproject.toml

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@ test = [
164164
]
165165

166166
lint = [
167-
"isort==5.13.2",
168167
"mypy==1.14.1",
169-
"black==23.12.0",
170-
"flake8==6.1.0",
171-
"flake8-bugbear==23.12.2",
172-
"flake8-docstrings==1.7.0",
173-
"flake8-spellcheck==0.28.0",
174-
"flake8-unused-arguments==0.0.13",
168+
"ruff==0.11.8",
175169
"vulture==2.14.0",
170+
# Black and isort are taken care of by ruff
171+
# "black==23.12.0",
172+
# "isort==5.13.2",
173+
# ruff does not cover spellcheck currently. It's an open issue.
174+
# https://github.com/astral-sh/ruff/issues/5014
175+
# "flake8-spellcheck==0.28.0",
176176
]
177177

178178
tools = [
@@ -210,13 +210,13 @@ ethereum-spec-fill = "cli.pytest_commands.fill:fill"
210210
"ethereum_spec_tools.docc:BeforeNode" = "ethereum_spec_tools.docc:render_before_after"
211211
"ethereum_spec_tools.docc:AfterNode" = "ethereum_spec_tools.docc:render_before_after"
212212

213-
[tool.isort]
214-
profile = "black"
215-
multi_line_output = 3
216-
line_length = 79
217-
218-
[tool.black]
219-
line-length = 79
213+
#[tool.isort]
214+
#profile = "black"
215+
#multi_line_output = 3
216+
#line_length = 79
217+
#
218+
#[tool.black]
219+
#line-length = 79
220220

221221
[tool.pytest.ini_options]
222222
markers = [
@@ -295,3 +295,50 @@ files = [
295295
[tool.docc.output]
296296
path = "docs"
297297
extension = ".html"
298+
299+
[tool.ruff]
300+
exclude = [
301+
'^\.cache/',
302+
'^\.git/',
303+
'^\.pytest_cache/',
304+
'^\.ruff_cache/',
305+
'^\.tox/',
306+
'^\.venv/',
307+
'^\.vscode/',
308+
'tests/fixtures/*',
309+
'vulture_whitelist.py',
310+
]
311+
line-length = 79
312+
313+
[tool.ruff.lint]
314+
select = [
315+
"E", # pycodestyle errors
316+
"F", # Pyflakes
317+
"B", # flake8-bugbear
318+
"W", # pycodestyle warnings
319+
"I", # isort
320+
"A", # flake8-builtins
321+
"N", # pep8-naming
322+
"ARG", # flake8-unused-arguments
323+
]
324+
fixable = [
325+
"E", # pycodestyle errors
326+
"F", # Pyflakes
327+
"B", # flake8-bugbear
328+
"W", # pycodestyle warnings
329+
"I", # isort
330+
"D", # pydocstyle
331+
]
332+
ignore = [
333+
# All of these are from EEST
334+
# "D205", # Missing blank line after summary
335+
# "D203", # 1 blank line required before class docstring
336+
# "D212", # Multi-line docstring summary should start at the first line
337+
# "D415", # First line should end with a ".", "?", or "!"
338+
# "C420", # Unnecessary dict comprehension
339+
# "C901", # Function is too complex
340+
# "A005", # stdlib module shadowing
341+
]
342+
343+
[tool.uv]
344+
required-version = ">=0.7.0"

tox.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ extras =
99
test
1010
doc
1111
commands =
12-
isort src tests --check --diff --skip-glob "tests/fixtures/*"
13-
black src tests --check --diff --exclude "tests/fixtures/*"
14-
flake8 src tests
12+
# isort src tests --check --diff --skip-glob "tests/fixtures/*"
13+
# black src tests --check --diff --exclude "tests/fixtures/*"
14+
# flake8 src tests
15+
ruff check src
1516
mypy src tests --exclude "tests/fixtures/*" --namespace-packages
1617
ethereum-spec-lint
1718
vulture src tests vulture_whitelist.py --exclude "*/tests/fixtures/*" --ignore-names "pytest_*"

0 commit comments

Comments
 (0)