Skip to content

Commit 70f3a8d

Browse files
committed
chore(fix) format with ruff
1 parent 9a20159 commit 70f3a8d

File tree

2 files changed

+35
-16
lines changed

2 files changed

+35
-16
lines changed

tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,7 +2443,9 @@ def test_bal_all_transaction_types(
24432443
storage_changes=[
24442444
BalStorageSlot(
24452445
slot=0x01,
2446-
slot_changes=[BalStorageChange(tx_index=1, post_value=0x01)],
2446+
slot_changes=[
2447+
BalStorageChange(tx_index=1, post_value=0x01)
2448+
],
24472449
)
24482450
],
24492451
),
@@ -2452,7 +2454,9 @@ def test_bal_all_transaction_types(
24522454
storage_changes=[
24532455
BalStorageSlot(
24542456
slot=0x01,
2455-
slot_changes=[BalStorageChange(tx_index=2, post_value=0x02)],
2457+
slot_changes=[
2458+
BalStorageChange(tx_index=2, post_value=0x02)
2459+
],
24562460
)
24572461
],
24582462
),
@@ -2463,7 +2467,9 @@ def test_bal_all_transaction_types(
24632467
storage_changes=[
24642468
BalStorageSlot(
24652469
slot=0x01,
2466-
slot_changes=[BalStorageChange(tx_index=3, post_value=0x03)],
2470+
slot_changes=[
2471+
BalStorageChange(tx_index=3, post_value=0x03)
2472+
],
24672473
)
24682474
],
24692475
),
@@ -2472,7 +2478,9 @@ def test_bal_all_transaction_types(
24722478
storage_changes=[
24732479
BalStorageSlot(
24742480
slot=0x01,
2475-
slot_changes=[BalStorageChange(tx_index=4, post_value=0x04)],
2481+
slot_changes=[
2482+
BalStorageChange(tx_index=4, post_value=0x04)
2483+
],
24762484
)
24772485
],
24782486
),
@@ -2488,7 +2496,9 @@ def test_bal_all_transaction_types(
24882496
storage_changes=[
24892497
BalStorageSlot(
24902498
slot=0x01,
2491-
slot_changes=[BalStorageChange(tx_index=5, post_value=0x05)],
2499+
slot_changes=[
2500+
BalStorageChange(tx_index=5, post_value=0x05)
2501+
],
24922502
)
24932503
],
24942504
),
@@ -2739,7 +2749,8 @@ def test_bal_create_selfdestruct_to_self_with_call(
27392749
# Balance changes: loses endowment (100)
27402750
balance_changes=[
27412751
BalBalanceChange(
2742-
tx_index=1, post_balance=factory_balance - endowment
2752+
tx_index=1,
2753+
post_balance=factory_balance - endowment,
27432754
)
27442755
],
27452756
),
@@ -2826,7 +2837,9 @@ def test_bal_revert_insufficient_funds(
28262837
contract = pre.deploy_contract(
28272838
code=contract_code,
28282839
balance=contract_balance,
2829-
storage={0x02: 0xDEAD}, # Non-zero initial value so SSTORE(0) is a change
2840+
storage={
2841+
0x02: 0xDEAD
2842+
}, # Non-zero initial value so SSTORE(0) is a change
28302843
)
28312844

28322845
tx = Transaction(
@@ -3096,7 +3109,9 @@ def test_bal_selfdestruct_to_precompile(
30963109
# Explicitly verify ALL fields to avoid false positives
30973110
victim: BalAccountExpectation(
30983111
nonce_changes=[], # Contract nonce unchanged
3099-
balance_changes=[BalBalanceChange(tx_index=1, post_balance=0)],
3112+
balance_changes=[
3113+
BalBalanceChange(tx_index=1, post_balance=0)
3114+
],
31003115
code_changes=[], # Code unchanged (post-Cancun SELFDESTRUCT)
31013116
storage_changes=[], # No storage changes
31023117
storage_reads=[], # No storage reads
@@ -3106,7 +3121,9 @@ def test_bal_selfdestruct_to_precompile(
31063121
ecrecover_precompile: BalAccountExpectation(
31073122
nonce_changes=[], # MUST NOT have nonce changes
31083123
balance_changes=[
3109-
BalBalanceChange(tx_index=1, post_balance=contract_balance)
3124+
BalBalanceChange(
3125+
tx_index=1, post_balance=contract_balance
3126+
)
31103127
],
31113128
code_changes=[], # MUST NOT have code changes
31123129
storage_changes=[], # MUST NOT have storage changes
@@ -3178,7 +3195,9 @@ def test_bal_create_early_failure(
31783195
)
31793196

31803197
# Calculate what the contract address WOULD be (but it won't be created)
3181-
would_be_contract_address = compute_create_address(address=factory, nonce=1)
3198+
would_be_contract_address = compute_create_address(
3199+
address=factory, nonce=1
3200+
)
31823201

31833202
tx = Transaction(
31843203
sender=alice,
@@ -3219,7 +3238,9 @@ def test_bal_create_early_failure(
32193238
post={
32203239
alice: Account(nonce=1),
32213240
# Factory nonce unchanged (still 1), balance unchanged
3222-
factory: Account(nonce=1, balance=factory_balance, storage={0x00: 0}),
3241+
factory: Account(
3242+
nonce=1, balance=factory_balance, storage={0x00: 0}
3243+
),
32233244
# Contract was never created
32243245
would_be_contract_address: Account.NONEXISTENT,
32253246
},

tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,9 @@ def test_bal_withdrawal_to_7702_delegation(
10101010
],
10111011
)
10121012

1013-
alice_final_balance = alice_initial_balance + (withdrawal_amount_gwei * GWEI)
1013+
alice_final_balance = alice_initial_balance + (
1014+
withdrawal_amount_gwei * GWEI
1015+
)
10141016

10151017
account_expectations = {
10161018
alice: BalAccountExpectation(
@@ -1068,7 +1070,3 @@ def test_bal_withdrawal_to_7702_delegation(
10681070
blocks=[block],
10691071
post=post,
10701072
)
1071-
1072-
1073-
1074-

0 commit comments

Comments
 (0)