@@ -286,17 +286,11 @@ fill = [
286286]
287287
288288lint = [
289- " isort==5.13.2 " ,
289+ " codespell==2.4.1 " ,
290290 " mypy==1.17.0" ,
291- " black==23.12.0" ,
292- " flake8==6.1.0" ,
293- " flake8-bugbear==23.12.2" ,
294- " flake8-docstrings==1.7.0" ,
295- " flake8-spellcheck==0.28.0" ,
296- " flake8-unused-arguments==0.0.13" ,
291+ " ruff==0.11.8" ,
297292 " vulture==2.14.0" ,
298293]
299-
300294tools = [
301295 " platformdirs>=4.2,<5" ,
302296]
@@ -309,7 +303,6 @@ optimized = [
309303 " ethash>=1.1.0,<2" ,
310304]
311305
312-
313306[tool .setuptools .dynamic ]
314307version = { attr = " ethereum.__version__" }
315308
@@ -332,14 +325,6 @@ ethereum-spec-fill = "cli.pytest_commands.fill:fill"
332325"ethereum_spec_tools.docc:BeforeNode" = " ethereum_spec_tools.docc:render_before_after"
333326"ethereum_spec_tools.docc:AfterNode" = " ethereum_spec_tools.docc:render_before_after"
334327
335- [tool .isort ]
336- profile = " black"
337- multi_line_output = 3
338- line_length = 79
339-
340- [tool .black ]
341- line-length = 79
342-
343328[tool .pytest .ini_options ]
344329markers = [
345330 " slow: marks tests as slow (deselect with '-m \" not slow\" ')" ,
@@ -362,7 +347,6 @@ context = [
362347 " docc.search.context" ,
363348 " docc.html.context" ,
364349]
365-
366350discovery = [
367351 " docc.search.discover" ,
368352 " docc.html.discover" ,
@@ -371,15 +355,13 @@ discovery = [
371355 " docc.listing.discover" ,
372356 " docc.files.discover" ,
373357]
374-
375358build = [
376359 " docc.search.build" ,
377360 " ethereum_spec_tools.docc.build" ,
378361 " docc.files.build" ,
379362 " docc.listing.build" ,
380363 " docc.resources.build" ,
381364]
382-
383365transform = [
384366 " docc.python.transform" ,
385367 " docc.verbatim.transform" ,
@@ -401,7 +383,6 @@ excluded_references = [
401383paths = [
402384 " src" ,
403385]
404-
405386excluded_paths = [
406387 " src/ethereum_optimized" ,
407388 " src/ethereum_spec_tools" ,
@@ -421,3 +402,121 @@ files = [
421402[tool .docc .output ]
422403path = " docs"
423404extension = " .html"
405+
406+ [tool .vulture ]
407+ exclude = [" tests/fixtures/" , " eest_tests/" ]
408+ ignore_names = [" pytest_*" ]
409+
410+ [tool .ruff ]
411+ extend-exclude = [
412+ " .cache/" ,
413+ " .git/" ,
414+ " .pytest_cache/" ,
415+ " .ruff_cache/" ,
416+ " .tox/" ,
417+ " .venv/" ,
418+ " .vscode/" ,
419+ " tests/fixtures/*" ,
420+ " tests/json_infra/fixtures/*" ,
421+ " eest_tests/*" ,
422+ " vulture_whitelist.py" ,
423+ ]
424+ line-length = 79
425+
426+ [tool .ruff .lint ]
427+ select = [
428+ " E" , # pycodestyle errors
429+ " F" , # Pyflakes
430+ " B" , # flake8-bugbear
431+ " W" , # pycodestyle warnings
432+ " I" , # isort
433+ " A" , # flake8-builtins
434+ " N" , # pep8-naming
435+ " ARG" , # flake8-unused-arguments
436+ ]
437+ fixable = [
438+ " E" , # pycodestyle errors
439+ " F" , # Pyflakes
440+ " B" , # flake8-bugbear
441+ " W" , # pycodestyle warnings
442+ " I" , # isort
443+ " D" , # pydocstyle
444+ ]
445+ ignore = [
446+ # Common to STEEL
447+ " D205" , # Missing blank line after summary
448+ " D203" , # 1 blank line required before class docstring
449+ " D212" , # Multi-line docstring summary should start at the first line
450+ " D415" , # First line should end with a ".", "?", or "!"
451+
452+ # Specific to EELS
453+ " D107" , # Missing docstring in __init__
454+ " D200" , # One-line docstring should fit on one line with quotes
455+ " D205" , # 1 blank line required between summary and description
456+ " D400" , # First line should end with a period
457+ " D401" , # First line should be in imperative mood ("Do", not "Does")
458+ " D410" , # Missing blank line after last section (Args, Returns, Raises)
459+ " D411" , # Missing blank line before last section
460+ " D412" , # No blank lines between sections
461+ " D413" , # Missing blank line after last section (same as 410)
462+ " D414" , # Section should end with a period
463+ " D416" , # Section names should be in the correct order
464+ " E203" , # Whitespace before ':'
465+ ]
466+
467+ [tool .ruff .lint .per-file-ignores ]
468+ "tests/*" = [
469+ " D100" , # Missing docstring in public module
470+ " D101" , # Missing docstring in public class
471+ " D103" , # Missing docstring in public function
472+ " D104" , # Missing docstring in public package
473+ " E501" , # Line too long
474+ ]
475+ "src/ethereum_spec_tools/evm_tools/loaders/fork_loader.py" = [
476+ " N802" # Property names do not need to be lowercase
477+ ]
478+ "src/ethereum_spec_tools/lint/*" = [
479+ " N802" # Special linting code absolved of function naming reqs
480+ ]
481+ "src/ethereum/crypto/*" = [
482+ " N806" , # Special crypto code absolved of variable naming reqs
483+ " N802" # Special crypto code absolved of function naming reqs
484+ ]
485+ "src/ethereum_spec_tools/evm_tools/t8n/evm_trace/eip3155.py" = [
486+ " N815" # The traces must use camel case in JSON property names
487+ ]
488+ "src/ethereum_spec_tools/evm_tools/t8n/evm_trace.py" = [
489+ " N815" # The traces must use camel case in JSON property names
490+ ]
491+
492+ [tool .ruff .lint .mccabe ]
493+ # Set the maximum allowed cyclomatic complexity. C901 default is 10.
494+ max-complexity = 7
495+
496+ [tool .codespell ]
497+ builtin = " clear,code,usage" # Built-in dictionaries to use
498+ skip = [ # Don't check these files/folders
499+ " .git/*" ,
500+ " .tox/*" ,
501+ " .venv/*" ,
502+ " build/*" ,
503+ " dist/*" ,
504+ " *.pyc" ,
505+ " ethereum_execution.egg-info/*" ,
506+ " *.coverage*" ,
507+ " __pycache__" ,
508+ " .ruff_cache" ,
509+ " fixtures.*" ,
510+ " tests/fixtures" ,
511+ " tests/json_infra/fixtures" ,
512+ " eest_tests" ,
513+ " src/ethereum_spec_tools/evm_tools/t8n" # Temporary while being re-written
514+ ]
515+ count = true # Display counts of errors
516+ check-hidden = false # Don't check hidden files (starting with .)
517+
518+ [tool .uv ]
519+ required-version = " >=0.7.0"
520+
521+ [tool .uv .sources ]
522+ "ethereum-spec-evm-resolver" = { git = " https://github.com/spencer-tb/ethereum-spec-evm-resolver" , rev = " aec6a628b8d0f1c791a8378c5417a089566135ac" }
0 commit comments