Skip to content

Commit 2b7ecc1

Browse files
committed
linting and formatting
1 parent af7aa92 commit 2b7ecc1

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

chainbench/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ def validate_profile_path(ctx: Context, param: Parameter, value: str) -> str:
210210
@click.option("--pg-password", default=None, help="PG password")
211211
@click.option("--use-latest-blocks", is_flag=True, help="Uses latest blocks for test data")
212212
@click.option("--size", default=None, help="Set the size of the test data. e.g. --size S")
213-
@click.option("--ref-url", default=None, help="Reference Node URL for retrieving test data before test starts. If not specified, target url is used instead.")
213+
@click.option(
214+
"--ref-url",
215+
default=None,
216+
help="Reference Node URL for retrieving test data before test starts. If not specified, target url is used.",
217+
)
214218
@click.pass_context
215219
def start(
216220
ctx: Context,
@@ -282,7 +286,7 @@ def start(
282286

283287
user_classes = {}
284288
for locustfile in parse_locustfile_paths([final_profile_path.__str__()]):
285-
_user_classes, _ = load_locustfile(locustfile)
289+
_user_classes, _ = load_locustfile(locustfile)
286290
for key, value in _user_classes.items():
287291
user_classes[key] = value
288292
test_data_types = set()

chainbench/util/event.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def cli_custom_arguments(parser: LocustArgumentParser):
5555
"--ref-url",
5656
type=str,
5757
default=None,
58-
help="Set the reference node url to be used for retrieving test data before test starts. If empty, defaults to target url.",
58+
help="Reference node url used for fetching test data before test starts. If empty, defaults to target url.",
5959
include_in_web_ui=True,
6060
)
6161

@@ -195,7 +195,11 @@ def on_init(environment: Environment, **_kwargs):
195195
logger.info(f"Initializing test data for {test_data_class_name}")
196196
print(f"Initializing test data for {test_data_class_name}")
197197
if environment.parsed_options:
198-
ref_node_url = environment.parsed_options.ref_url if environment.parsed_options.ref_url is not None else environment.host
198+
ref_node_url = (
199+
environment.parsed_options.ref_url
200+
if environment.parsed_options.ref_url is not None
201+
else environment.host
202+
)
199203
user_test_data.init_http_client(ref_node_url)
200204
if isinstance(user_test_data, EvmTestData):
201205
chain_id: ChainId = user_test_data.fetch_chain_id()

0 commit comments

Comments
 (0)