Skip to content

Commit 9f96fad

Browse files
authored
chore(all): rename shadowed modules to enable ruff a005 (#2133)
1 parent ef683b2 commit 9f96fad

File tree

159 files changed

+194
-232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+194
-232
lines changed

docs/writing_tests/tutorials/state_transition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In Python, multi-line strings are denoted using `"""`. As a convention, a file's
3232
import pytest
3333

3434
from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction
35-
from ethereum_test_tools.vm.opcode import Opcodes as Op
35+
from ethereum_test_vm import Opcodes as Op
3636
```
3737

3838
In this snippet the required constants, types and helper functions are imported from `ethereum_test_tools`. The `Opcodes` class (aliased as `Op`) provides the Python minilang for writing EVM bytecode. We will go over these as we come across them.

docs/writing_tests/writing_a_new_test.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ For a full list of available opcodes and their usage, see [`Opcodes`][ethereum_t
176176

177177
#### Higher-Level Constructs
178178

179-
For more complex control flow, you can use constructs like [`Switch`][ethereum_test_tools.code.generators.Switch] and [`Case`][ethereum_test_tools.code.generators.Case] from the `ethereum_test_tools.code.generators` module:
179+
For more complex control flow, you can use constructs like [`Switch`][ethereum_test_tools.tools_code.generators.Switch] and [`Case`][ethereum_test_tools.tools_code.generators.Case] from the `ethereum_test_tools.tools_code.generators` module:
180180

181181
```python
182-
from ethereum_test_tools.code.generators import Switch, Case
182+
from ethereum_test_tools.tools_code.generators import Switch, Case
183183
from ethereum_test_vm.opcode import Opcodes as Op
184184

185185
code = Switch(
@@ -191,7 +191,7 @@ code = Switch(
191191
)
192192
```
193193

194-
The `ethereum_test_tools.code.generators` module also defines other high-level constructs like [`While`][ethereum_test_tools.code.generators.While] and [`Conditional`][ethereum_test_tools.code.generators.Conditional].
194+
The `ethereum_test_tools.tools_code.generators` module also defines other high-level constructs like [`While`][ethereum_test_tools.tools_code.generators.While] and [`Conditional`][ethereum_test_tools.tools_code.generators.Conditional].
195195

196196
#### Converting Bytecode to Minilang
197197

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ line-length = 99
129129
[tool.ruff.lint]
130130
select = ["E", "F", "B", "W", "I", "A", "N", "D", "C"]
131131
fixable = ["I", "B", "E", "F", "W", "D", "C"]
132-
ignore = ["D205", "D203", "D212", "D415", "C901", "A005"]
132+
ignore = ["D205", "D203", "D212", "D415", "C420", "C901"]
133133

134134
[tool.mypy]
135135
disable_error_code = ["import-untyped"]

src/cli/eest/make/templates/blockchain_test.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ from ethereum_test_tools import (
1414
Environment,
1515
Transaction,
1616
)
17-
from ethereum_test_tools.vm.opcode import Opcodes as Op
17+
from ethereum_test_vm import Opcodes as Op
1818

1919
REFERENCE_SPEC_GIT_PATH = "DUMMY/eip-DUMMY.md"
2020
REFERENCE_SPEC_VERSION = "DUMMY_VERSION"

src/cli/eest/make/templates/state_test.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import pytest
77

88
from ethereum_test_forks import Fork
99
from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction
10-
from ethereum_test_tools.vm.opcode import Opcodes as Op
10+
from ethereum_test_vm import Opcodes as Op
1111

1212
REFERENCE_SPEC_GIT_PATH = "DUMMY/eip-DUMMY.md"
1313
REFERENCE_SPEC_VERSION = "DUMMY_VERSION"

src/cli/eofwrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from ethereum_test_types import Transaction
3434
from ethereum_test_types.block_types import Environment
3535
from ethereum_test_types.eof.v1 import Container
36-
from ethereum_test_vm.bytecode import Bytecode
36+
from ethereum_test_vm import Bytecode
3737

3838
from .evm_bytes import OpcodeWithOperands, process_evm_bytes
3939

src/cli/evm_bytes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
import click
77

88
from ethereum_test_base_types import ZeroPaddedHexNumber
9-
from ethereum_test_vm import Macro
9+
from ethereum_test_vm import Bytecode, Macro
1010
from ethereum_test_vm import Opcodes as Op
11-
from ethereum_test_vm.bytecode import Bytecode
1211

1312
OPCODES_WITH_EMPTY_LINES_AFTER = {
1413
Op.STOP,

src/cli/gentest/request_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from config import EnvConfig
1616
from ethereum_test_base_types import Hash
1717
from ethereum_test_rpc import BlockNumberType, DebugRPC, EthRPC
18-
from ethereum_test_rpc.types import TransactionByHashResponse
18+
from ethereum_test_rpc.rpc_types import TransactionByHashResponse
1919
from ethereum_test_types import Environment
2020

2121

src/cli/gentest/test_context_providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from pydantic import BaseModel
2020

2121
from ethereum_test_base_types import Account, Hash
22-
from ethereum_test_rpc.types import TransactionByHashResponse
22+
from ethereum_test_rpc.rpc_types import TransactionByHashResponse
2323
from ethereum_test_tools import Environment, Transaction
2424

2525
from .request_manager import RPCRequest

src/cli/gentest/test_providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from pydantic import BaseModel
1818

1919
from ethereum_test_base_types import Account, Address, ZeroPaddedHexNumber
20-
from ethereum_test_rpc.types import TransactionByHashResponse
20+
from ethereum_test_rpc.rpc_types import TransactionByHashResponse
2121
from ethereum_test_types import Environment
2222

2323

0 commit comments

Comments
 (0)