diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 70ff7bd52..fd58425f1 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -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..." @@ -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. @@ -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 diff --git a/bittensor_cli/src/commands/stake/add.py b/bittensor_cli/src/commands/stake/add.py index cbc1ae242..4aba39e69 100644 --- a/bittensor_cli/src/commands/stake/add.py +++ b/bittensor_cli/src/commands/stake/add.py @@ -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() @@ -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() diff --git a/bittensor_cli/src/commands/subnets/subnets.py b/bittensor_cli/src/commands/subnets/subnets.py index d71d726f8..f4e01486c 100644 --- a/bittensor_cli/src/commands/subnets/subnets.py +++ b/bittensor_cli/src/commands/subnets/subnets.py @@ -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) @@ -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(