Skip to content

chore(all): rename shadowed modules to enable ruff a005#2133

Merged
danceratopz merged 3 commits into
ethereum:mainfrom
felix314159:ruff-rules-eest
Sep 19, 2025
Merged

chore(all): rename shadowed modules to enable ruff a005#2133
danceratopz merged 3 commits into
ethereum:mainfrom
felix314159:ruff-rules-eest

Conversation

@felix314159

@felix314159 felix314159 commented Sep 11, 2025

Copy link
Copy Markdown
Collaborator

🗒️ Description

Title is self-explanatory, this PR allows us to (and does) enable checking for ruff a005

Relevant for #2128

Old name -> New name

  • Summary of rename changes:
    • pytest_plugins.logging.logging -> pytest_plugins.custom_logging.plugin_logging
    • code -> tools_code
    • types -> rpc_types / cli_types / exceptions_types / execute_types
    • json -> base_types_json
    • src/ethereum_test_tools/vm/ -> [rip bozo]
    • src/ethereum_test_vm/opcode.py -> src/ethereum_test_vm/opcodes.py

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

@marioevz marioevz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for tackling this issue.

Just two small suggestions which could also help with the Opcodes discussion we had earlier today.

Comment thread tests/cancun/eip6780_selfdestruct/test_selfdestruct.py Outdated
Comment thread tests/frontier/opcodes/test_call.py Outdated
@danceratopz danceratopz changed the title chores(shadow_definitions): Renames shadowed files to allow enabling ruff a005 chore(all): rename shadowed modules to enable ruff a005 Sep 19, 2025
@danceratopz danceratopz added the type:chore Type: Chore label Sep 19, 2025

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @felix314159. The imports read much more clearly now.

I couldn't get to the bottom of the coverage flow fails (yet). The flow is failing when the filled fixtures (which get filled with evmone-t8n btw and gas-limit 45M) are ran against evmone-blocktest. I have not been able to reproduce this locally by building, filling with evmone and running the tests. It would need more investigation.

I filled all the modified tests on this branch and compared them to those generated on main via hasher. No changes, it is good.

Show full `fill` command.

uv run fill --until osaka tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py tests/benchmark/test_worst_bytecode.py tests/benchmark/test_worst_compute.py tests/benchmark/test_worst_memory.py tests/benchmark/test_worst_opcode.py tests/benchmark/test_worst_stateful_opcodes.py tests/berlin/eip2929_gas_cost_increases/test_precompile_warming.py tests/byzantium/eip198_modexp_precompile/test_modexp.py tests/cancun/eip1153_tstore/test_basic_tload.py tests/cancun/eip1153_tstore/test_tload_calls.py tests/cancun/eip1153_tstore/test_tload_reentrancy.py tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py tests/cancun/eip1153_tstore/test_tstore_reentrancy.py tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py tests/cancun/eip6780_selfdestruct/test_selfdestruct.py tests/frontier/opcodes/test_all_opcodes.py tests/frontier/opcodes/test_call.py tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py tests/frontier/opcodes/test_calldatacopy.py tests/frontier/opcodes/test_calldataload.py tests/frontier/opcodes/test_calldatasize.py tests/frontier/precompiles/test_precompiles.py tests/frontier/scenarios/test_scenarios.py tests/homestead/coverage/test_coverage.py tests/istanbul/eip1344_chainid/test_chainid.py tests/istanbul/eip152_blake2/test_blake2.py tests/osaka/eip7594_peerdas/test_get_blobs.py tests/osaka/eip7823_modexp_upper_bounds/test_modexp_upper_bounds.py tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit.py tests/osaka/eip7825_transaction_gas_limit_cap/test_tx_gas_limit_transition_fork.py tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py tests/paris/security/test_selfdestruct_balance_bug.py tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py tests/shanghai/eip3855_push0/test_push0.py tests/shanghai/eip3860_initcode/test_initcode.py tests/shanghai/eip3860_initcode/test_with_eof.py tests/shanghai/eip4895_withdrawals/test_withdrawals.py --clean --output=fixtures-2133

I would like to understand the evmone coverage script fails, but they appear to be independent of this branch, see also this run which filled/ran tests:
https://github.com/ethereum/execution-spec-tests/actions/runs/17761869978/job/50476287251

This job is for your other PR @felix314159 #2152, let's continue to investigate there.

With parity on fixture hashes I think this is safe to merge now.

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was slightly too fast. @felix314159 could you just update these to address Mario's comments in his review.

Comment thread tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py Outdated
@felix314159

Copy link
Copy Markdown
Collaborator Author

Thx for the reviews, @danceratopz and mario! Can be merged now

@danceratopz danceratopz merged commit 9f96fad into ethereum:main Sep 19, 2025
15 of 16 checks passed
kclowes pushed a commit to kclowes/execution-spec-tests that referenced this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Type: Chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants