Skip to content

Commit 217ead5

Browse files
committed
Ruff
1 parent e44d6e1 commit 217ead5

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

bittensor_cli/src/commands/sudo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async def set_hyperparameter_extrinsic(
201201
)
202202
if subnet_owner != wallet.coldkeypub.ss58_address:
203203
err_msg = (
204-
":cross_mark: [red]This wallet doesn't own the specified subnet.[/red]"
204+
f":cross_mark: [red]This wallet doesn't own the specified subnet.[/red]"
205205
)
206206
err_console.print(err_msg)
207207
return False, err_msg

tests/e2e_tests/test_hyperparams_setting.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,26 @@ def test_hyperparams_setting(local_chain, wallet_setup):
7878
else:
7979
new_val = hp[key] - 1
8080
else:
81-
raise ValueError(f"Unrecognized hyperparameter value type: {key}: {hp[key]}")
81+
raise ValueError(
82+
f"Unrecognized hyperparameter value type: {key}: {hp[key]}"
83+
)
8284
cmd = exec_command_alice(
8385
command="sudo",
8486
sub_command="set",
85-
extra_args=["--chain", "ws://127.0.0.1:9945", "--netuid", netuid, "--verbose", "--no-prompt",
86-
"--param", key, "--value", new_val],
87+
extra_args=[
88+
"--network",
89+
"ws://127.0.0.1:9945",
90+
"--netuid",
91+
netuid,
92+
"--json-out",
93+
"--no-prompt",
94+
"--param",
95+
key,
96+
"--value",
97+
new_val,
98+
],
8799
)
88100
cmd_json = json.loads(cmd.stdout)
89-
assert cmd_json["success"] is True, (
90-
key, new_val, cmd.stdout, cmd_json
91-
)
101+
assert cmd_json["success"] is True, (key, new_val, cmd.stdout, cmd_json)
92102
print(f"Successfully set hyperparameter {key} to value {new_val}")
93103
print("Successfully set hyperparameters")

0 commit comments

Comments
 (0)