Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(all): add ruff as default linter and additional clean up #922

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ pip-delete-this-directory.txt
.coverage

# misc
.vscode/settings.json
.vscode/launch.json
*.code-workspace
verify_kzg_proof
.vscode/launch.recommended.json
.vscode/settings.local.recommended.json

# docs
.cache
Expand Down
38 changes: 19 additions & 19 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-python.python",
"ms-python.isort",
"ms-python.flake8",
"ms-python.mypy-type-checker",
"ms-python.black-formatter",
"esbenp.prettier-vscode",
"njpwerner.autodocstring", // https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"bierner.markdown-mermaid", // https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
"bpruitt-goddard.mermaid-markdown-syntax-highlighting", // https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting
"DavidAnson.vscode-markdownlint", // https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
// List of extensions that MUST be used for users of the repo.
"recommendations": [
"ms-python.python",
"ms-python.mypy-type-checker",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"njpwerner.autodocstring",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"bierner.markdown-mermaid",
"bpruitt-goddard.mermaid-markdown-syntax-highlighting",
"DavidAnson.vscode-markdownlint"
],
// List of extensions that MUST NOT be used for users of the repo.
"unwantedRecommendations": [
"ms-python.black-formatter",
"ms-python.flake8",
"ms-python.isort"
]
}
244 changes: 122 additions & 122 deletions .vscode/launch.recommended.json
Original file line number Diff line number Diff line change
@@ -1,133 +1,133 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// If the VS Code "Run and Debug" button, respecively launch selector are not visible, see this answer:
// https://stackoverflow.com/a/74245823
//
"version": "0.2.0",
"configurations": [
{
"name": "Launch fill --until choose fork",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"${input:fork}",
"--evm-bin",
"${input:evmBinary}",
"-v"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Launch fill -k choose test path",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"Cancun",
"--evm-bin",
"${input:evmBinary}",
"-v",
"-k",
"${input:testPathOrId}"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Launch fill --until Cancun",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"Cancun",
"--evm-bin",
"${input:evmBinary}",
"-v"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Launch fill --until Prague",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"Prague",
"--evm-bin",
"${input:evmBinary}",
"-v"
],
"cwd": "${workspaceFolder}"
}
],
"inputs": [
{
"type": "pickString",
"id": "evmBinary",
"description": "Which evm binary to you want to run?",
"options": [
"_comment": [
"Main configuration for VS Code debugging",
"Use IntelliSense to learn about possible attributes.",
"If the VS Code 'Run and Debug' button or launch selector",
"is not visible, see: https://stackoverflow.com/a/74245823"
],
"version": "0.2.0",
"configurations": [
{
"label": "First evm binary in PATH",
"value": "evm",
"name": "Launch fill --until choose fork",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"${input:fork}",
"--evm-bin",
"${input:evmBinary}",
"-v"
],
"cwd": "${workspaceFolder}"
},
{
"label": "Geth, mario's repo",
"value": "~/code/github/marioevz/go-ethereum/build/bin/evm",
"name": "Launch fill -k choose test path",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"Cancun",
"--evm-bin",
"${input:evmBinary}",
"-v",
"-k",
"${input:testPathOrId}"
],
"cwd": "${workspaceFolder}"
},
{
"label": "Geth, danceratopz's repo",
"value": "~/code/github/danceratopz/go-ethereum/build/bin/evm",
"name": "Launch fill --until Cancun",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"Cancun",
"--evm-bin",
"${input:evmBinary}",
"-v"
],
"cwd": "${workspaceFolder}"
},
{
"label": "evmone",
"value": "~/code/github/ethereum/evmone/build/bin/evmone-t8n",
"name": "Launch fill --until Prague",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"pytest.ini",
"--until",
"Prague",
"--evm-bin",
"${input:evmBinary}",
"-v"
],
"cwd": "${workspaceFolder}"
}
],
"inputs": [
{
"type": "pickString",
"id": "evmBinary",
"description": "Which evm binary to you want to run?",
"options": [
{
"label": "First evm binary in PATH",
"value": "evm"
},
{
"label": "Geth, mario's repo",
"value": "~/code/github/marioevz/go-ethereum/build/bin/evm"
},
{
"label": "Geth, danceratopz's repo",
"value": "~/code/github/danceratopz/go-ethereum/build/bin/evm"
},
{
"label": "evmone",
"value": "~/code/github/ethereum/evmone/build/bin/evmone-t8n"
},
{
"label": "besu",
"value": "~/code/github/danceratopz/besu/ethereum/evmtool/build/install/evmtool/bin/evm"
}
],
"default": "evm"
},
{
"type": "pickString",
"id": "fork",
"description": "Which fork do you want to use?",
"options": [
"Frontier",
"Homestead",
"Byzantium",
"Constantinople",
"ConstantinopleFix",
"Istanbul",
"Berlin",
"London",
"Paris",
"Shanghai",
"Cancun",
"Prague"
],
"default": "Cancun"
},
{
"label": "besu",
"value": "~/code/github/danceratopz/besu/ethereum/evmtool/build/install/evmtool/bin/evm",
"type": "promptString",
"id": "testPathOrId",
"description": "Enter a test path string or id to provide to pytest -k",
"default": "test_"
}
],
"default": "evm"
},
{
"type": "pickString",
"id": "fork",
"description": "Which fork do you want to use?",
"options": [
"Frontier",
"Homestead",
"Byzantium",
"Constantinople",
"ConstantinopleFix",
"Istanbul",
"Berlin",
"London",
"Paris",
"Shanghai",
"Cancun",
"Prague",
],
"default": "Cancun"
},
{
"type": "promptString",
"id": "testPathOrId",
"description": "Enter a test path string or id to provide to pytest -k",
"default": "test_"
}
]
}
]
}
29 changes: 29 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// Static settings that users MUST adhere to when
// developing with the EEST repo.
"cSpell.customDictionaries": {
"project-words": {
"name": "project-words",
"path": "${workspaceRoot}/whitelist.txt",
"description": "Words used in this project",
"addWords": true
},
"custom": true,
"internal-terms": false
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.rulers": [100],
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"python.analysis.autoFormatStrings": true,
"ruff.enable": true,
"ruff.lint.args": ["--line-length", "99", "--fix"],
"extensions.ignoreRecommendations": false
}
9 changes: 9 additions & 0 deletions .vscode/settings.local.recommended.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"_comment": [
"Dynamic python testing settings for the vscode testing extension."
],
"python.testing.promptToConfigure": false,
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["-c", "pytest.ini"]
}
40 changes: 0 additions & 40 deletions .vscode/settings.recommended.json

This file was deleted.

Loading
Loading