Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bittensor_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Options:
)
mnemonic = typer.Option(
None,
help="Mnemonic used to regenerate your key. For example: horse cart dog ...",
help='Mnemonic used to regenerate your key. For example: "horse cart dog ..."',
)
seed = typer.Option(
None, help="Seed hex string used to regenerate your key. For example: 0x1234..."
Expand Down Expand Up @@ -2130,6 +2130,7 @@ def wallet_regen_hotkey(
# Example usage:

[green]$[/green] btcli wallet regen_hotkey --seed 0x1234...
[green]$[/green] btcli wallet regen-hotkey --mnemonic "word1 word2 ... word12"

[bold]Note[/bold]: This command is essential for users who need to regenerate their hotkey, possibly for security upgrades or key recovery.
It should be used with caution to avoid accidental overwriting of existing keys.
Expand Down Expand Up @@ -3229,10 +3230,11 @@ def stake_remove(
ask_for=[WO.NAME, WO.PATH],
)
else:
if not hotkey_ss58_address and not wallet_hotkey:
if not hotkey_ss58_address and not wallet_hotkey:
hotkey_or_ss58 = Prompt.ask(
"Enter the [blue]hotkey[/blue] name or [blue]ss58 address[/blue] to unstake all from [dim](or enter 'all' to unstake from all hotkeys)[/dim]",
default=self.config.get("wallet_hotkey") or defaults.wallet.hotkey,
default=self.config.get("wallet_hotkey")
or defaults.wallet.hotkey,
)
else:
hotkey_or_ss58 = hotkey_ss58_address or wallet_hotkey
Expand Down
8 changes: 2 additions & 6 deletions bittensor_cli/src/commands/stake/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ async def safe_stake_extrinsic(
)
return
else:
err_out(
f"\n{failure_prelude} with error: {format_error_message(e)}"
)
err_out(f"\n{failure_prelude} with error: {format_error_message(e)}")
return
else:
await response.process_events()
Expand Down Expand Up @@ -180,9 +178,7 @@ async def stake_extrinsic(
extrinsic, wait_for_inclusion=True, wait_for_finalization=False
)
except SubstrateRequestException as e:
err_out(
f"\n{failure_prelude} with error: {format_error_message(e)}"
)
err_out(f"\n{failure_prelude} with error: {format_error_message(e)}")
return
else:
await response.process_events()
Expand Down
8 changes: 3 additions & 5 deletions bittensor_cli/src/commands/subnets/subnets.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,8 @@ async def show_root():
total_emission_per_block = 0
for netuid_ in range(len(all_subnets)):
subnet = all_subnets[netuid_]
emission_on_subnet = (
root_state.emission_history[netuid_][idx] / (subnet.tempo or 1)
emission_on_subnet = root_state.emission_history[netuid_][idx] / (
subnet.tempo or 1
)
total_emission_per_block += subnet.alpha_to_tao(
Balance.from_rao(emission_on_subnet)
Expand Down Expand Up @@ -2135,9 +2135,7 @@ async def get_identity(subtensor: "SubtensorInterface", netuid: int, title: str
title = "Subnet Identity"

if not await subtensor.subnet_exists(netuid):
print_error(
f"Subnet {netuid} does not exist."
)
print_error(f"Subnet {netuid} does not exist.")
raise typer.Exit()

with console.status(
Expand Down
Loading