Skip to content

Commit 100c8c7

Browse files
committed
Run black after v23 was released
1 parent 7e31ad0 commit 100c8c7

26 files changed

+7
-64
lines changed

ethpm/tools/checker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def check_sources(manifest: Manifest, warnings: Dict[str, str]) -> Dict[str, str
181181
# Contract Types
182182
#
183183

184+
184185
# todo: validate a contract type matches source
185186
@curry
186187
def check_contract_types(

tests/core/contracts/test_contract_deployment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ async def test_async_contract_deployment_with_constructor_arguments(
167167
async_constructor_with_args_contract_factory,
168168
constructor_arg,
169169
):
170-
171170
deploy_txn = await async_constructor_with_args_contract_factory.constructor(
172171
1234, constructor_arg
173172
).transact()

tests/core/contracts/test_contract_example.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def test_initial_greeting(foo_contract):
8383

8484
def test_can_update_greeting(w3, foo_contract):
8585
# send transaction that updates the greeting
86-
tx_hash = foo_contract.functions.setBar("testing contracts is easy",).transact(
86+
tx_hash = foo_contract.functions.setBar(
87+
"testing contracts is easy",
88+
).transact(
8789
{
8890
"from": w3.eth.accounts[1],
8991
}
@@ -97,7 +99,9 @@ def test_can_update_greeting(w3, foo_contract):
9799

98100
def test_updating_greeting_emits_event(w3, foo_contract):
99101
# send transaction that updates the greeting
100-
tx_hash = foo_contract.functions.setBar("testing contracts is easy",).transact(
102+
tx_hash = foo_contract.functions.setBar(
103+
"testing contracts is easy",
104+
).transact(
101105
{
102106
"from": w3.eth.accounts[1],
103107
}

tests/core/contracts/test_contract_transact_interface.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ async def test_async_transacting_with_contract_with_byte_array_argument_non_stri
511511
async def test_async_transacting_with_contract_respects_explicit_gas(
512512
async_w3, string_contract_data, async_call, async_transact
513513
):
514-
515514
StringContract = async_w3.eth.contract(**string_contract_data)
516515

517516
deploy_txn = await StringContract.constructor("Caqalai").transact()
@@ -541,7 +540,6 @@ async def test_async_transacting_with_contract_respects_explicit_gas(
541540
async def test_async_auto_gas_computation_when_transacting(
542541
async_w3, string_contract_data, async_call, async_transact
543542
):
544-
545543
StringContract = async_w3.eth.contract(**string_contract_data)
546544

547545
deploy_txn = await StringContract.constructor("Caqalai").transact()

tests/core/contracts/test_extracting_event_data.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
@pytest.fixture()
2727
def dup_txn_receipt(w3, indexed_event_contract, wait_for_transaction, event_contract):
28-
2928
emitter_fn = indexed_event_contract.functions.logTwoEvents
3029

3130
txn_hash = emitter_fn(12345).transact()
@@ -557,7 +556,6 @@ def test_event_rich_log(
557556
process_receipt,
558557
expected_args,
559558
):
560-
561559
emitter_fn = emitter.functions[contract_fn]
562560
if hasattr(emitter_contract_event_ids, event_name):
563561
event_id = getattr(emitter_contract_event_ids, event_name)
@@ -821,7 +819,6 @@ def test_event_rich_log_non_strict(
821819
process_receipt,
822820
expected_args,
823821
):
824-
825822
emitter_fn = non_strict_emitter.functions[contract_fn]
826823
if hasattr(emitter_contract_event_ids, event_name):
827824
event_id = getattr(emitter_contract_event_ids, event_name)
@@ -929,7 +926,6 @@ def test_receipt_processing_with_ignore_flag(
929926

930927

931928
def test_receipt_processing_with_warn_flag(indexed_event_contract, dup_txn_receipt):
932-
933929
event_instance = indexed_event_contract.events.LogSingleWithIndex()
934930

935931
with pytest.warns(UserWarning, match="Expected 1 log topics. Got 0"):
@@ -938,23 +934,20 @@ def test_receipt_processing_with_warn_flag(indexed_event_contract, dup_txn_recei
938934

939935

940936
def test_receipt_processing_with_strict_flag(indexed_event_contract, dup_txn_receipt):
941-
942937
event_instance = indexed_event_contract.events.LogSingleWithIndex()
943938

944939
with pytest.raises(LogTopicError, match="Expected 1 log topics. Got 0"):
945940
event_instance.process_receipt(dup_txn_receipt, errors=STRICT)
946941

947942

948943
def test_receipt_processing_with_invalid_flag(indexed_event_contract, dup_txn_receipt):
949-
950944
event_instance = indexed_event_contract.events.LogSingleWithIndex()
951945

952946
with pytest.raises(AttributeError, match="Error flag must be one of: "):
953947
event_instance.process_receipt(dup_txn_receipt, errors="not-a-flag")
954948

955949

956950
def test_receipt_processing_with_no_flag(indexed_event_contract, dup_txn_receipt):
957-
958951
event_instance = indexed_event_contract.events.LogSingleWithIndex()
959952

960953
with pytest.warns(UserWarning, match="Expected 1 log topics. Got 0"):

tests/core/eth-module/test_eth_filter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ async def async_w3():
4242

4343
@pytest.mark.asyncio
4444
async def test_AsyncEth_filter_creates_correct_filter_type(async_w3):
45-
4645
filter1 = await async_w3.eth.filter("latest")
4746
assert isinstance(filter1, AsyncBlockFilter)
4847
filter2 = await async_w3.eth.filter("pending")

tests/core/filtering/test_contract_get_logs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def test_contract_get_logs_range(
5555
def test_contract_get_logs_argument_filter(
5656
w3, emitter, wait_for_transaction, emitter_contract_event_ids
5757
):
58-
5958
contract = emitter
6059

6160
txn_hashes = []
@@ -158,7 +157,6 @@ async def test_async_contract_get_logs_range(
158157
async def test_async_contract_get_logs_argument_filter(
159158
async_w3, async_emitter, async_wait_for_transaction, emitter_contract_event_ids
160159
):
161-
162160
contract = async_emitter
163161

164162
txn_hashes = []

tests/core/filtering/test_contract_on_event_filtering.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test_on_filter_using_get_entries_interface(
3737
api_style,
3838
create_filter,
3939
):
40-
4140
if call_deployed_contract:
4241
contract = emitter
4342
else:
@@ -74,7 +73,6 @@ def test_on_sync_filter_with_event_name_and_single_argument(
7473
api_style,
7574
create_filter,
7675
):
77-
7876
if call_deployed_contract:
7977
contract = emitter
8078
else:
@@ -122,7 +120,6 @@ def test_on_sync_filter_with_event_name_and_non_indexed_argument(
122120
api_style,
123121
create_filter,
124122
):
125-
126123
if call_deployed_contract:
127124
contract = emitter
128125
else:
@@ -192,7 +189,6 @@ def test_on_sync_filter_with_topic_filter_options_on_old_apis(
192189
call_deployed_contract,
193190
create_filter,
194191
):
195-
196192
if call_deployed_contract:
197193
contract = emitter
198194
else:
@@ -270,7 +266,6 @@ async def test_on_async_filter_using_get_entries_interface(
270266
api_style,
271267
async_create_filter,
272268
):
273-
274269
if call_deployed_contract:
275270
contract = async_emitter
276271
else:
@@ -310,7 +305,6 @@ async def test_on_async_filter_with_event_name_and_single_argument(
310305
api_style,
311306
async_create_filter,
312307
):
313-
314308
if call_deployed_contract:
315309
contract = async_emitter
316310
else:
@@ -365,7 +359,6 @@ async def test_on_async_filter_with_event_name_and_non_indexed_argument(
365359
api_style,
366360
async_create_filter,
367361
):
368-
369362
if call_deployed_contract:
370363
contract = async_emitter
371364
else:
@@ -445,7 +438,6 @@ async def test_on_async_filter_with_topic_filter_options_on_old_apis(
445438
call_deployed_contract,
446439
async_create_filter,
447440
):
448-
449441
if call_deployed_contract:
450442
contract = async_emitter
451443
else:

tests/core/filtering/test_filters_against_many_blocks.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def test_event_filter_new_events(
4242
api_style,
4343
create_filter,
4444
):
45-
4645
matching_transact = emitter.functions.logNoArgs(which=1).transact
4746
non_matching_transact = emitter.functions.logNoArgs(which=0).transact
4847

@@ -77,7 +76,6 @@ def test_block_filter(w3):
7776

7877

7978
def test_transaction_filter_with_mining(w3):
80-
8179
transaction_filter = w3.eth.filter("pending")
8280

8381
transaction_counter = 0
@@ -109,7 +107,6 @@ def test_event_filter_new_events_many_deployed_contracts(
109107
api_style,
110108
create_filter,
111109
):
112-
113110
matching_transact = emitter.functions.logNoArgs(which=1).transact
114111

115112
deployed_contract_addresses = deploy_contracts(
@@ -192,7 +189,6 @@ async def test_async_event_filter_new_events(
192189
async_wait_for_transaction,
193190
api_style,
194191
):
195-
196192
matching_transact = async_emitter.functions.logNoArgs(which=1).transact
197193
non_matching_transact = async_emitter.functions.logNoArgs(which=0).transact
198194

@@ -271,7 +267,6 @@ async def test_async_event_filter_new_events_many_deployed_contracts(
271267
async_wait_for_transaction,
272268
api_style,
273269
):
274-
275270
matching_transact = async_emitter.functions.logNoArgs(which=1).transact
276271

277272
deployed_contract_addresses = await async_deploy_contracts(

tests/core/manager/test_response_formatters.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ def test_formatted_response_raises_errors(
190190
def test_formatted_response_raises_correct_error_message(
191191
response, w3, params, error_formatters, null_result_formatters, error, error_message
192192
):
193-
194193
with pytest.raises(error, match=error_message):
195194
w3.manager.formatted_response(
196195
response, params, error_formatters, null_result_formatters
@@ -223,7 +222,6 @@ def test_formatted_response_raises_correct_error_message(
223222
def test_formatted_response(
224223
response, w3, params, error_formatters, null_result_formatters, expected
225224
):
226-
227225
formatted_resp = w3.manager.formatted_response(
228226
response, params, error_formatters, null_result_formatters
229227
)

0 commit comments

Comments
 (0)