From 003283b6056c814b08ec006d30efeec1642264e6 Mon Sep 17 00:00:00 2001 From: Benjamin Himes Date: Fri, 14 Feb 2025 00:02:47 +0200 Subject: [PATCH] Fix return type annotation. --- bittensor_cli/src/bittensor/chain_data.py | 4 +++- bittensor_cli/src/commands/sudo.py | 10 ++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/bittensor_cli/src/bittensor/chain_data.py b/bittensor_cli/src/bittensor/chain_data.py index 3b5a4c89a..d873d51cf 100644 --- a/bittensor_cli/src/bittensor/chain_data.py +++ b/bittensor_cli/src/bittensor/chain_data.py @@ -750,7 +750,9 @@ def tao_to_alpha_with_slippage(self, tao: Balance) -> tuple[Balance, Balance]: ) return alpha_returned, slippage, slippage_pct_float - def alpha_to_tao_with_slippage(self, alpha: Balance) -> tuple[Balance, Balance]: + def alpha_to_tao_with_slippage( + self, alpha: Balance + ) -> tuple[Balance, Balance, float]: """ Returns an estimate of how much TAO would a staker receive if they unstake their alpha using the current pool state. Args: diff --git a/bittensor_cli/src/commands/sudo.py b/bittensor_cli/src/commands/sudo.py index 58c6a4b15..290e7eac3 100644 --- a/bittensor_cli/src/commands/sudo.py +++ b/bittensor_cli/src/commands/sudo.py @@ -657,10 +657,7 @@ async def senate_vote( return False # Unlock the wallet. - if ( - not unlock_key(wallet, "hot").success - and unlock_key(wallet, "cold").success - ): + if not unlock_key(wallet, "hot").success and unlock_key(wallet, "cold").success: return False console.print(f"Fetching proposals in [dark_orange]network: {subtensor.network}") @@ -736,10 +733,7 @@ async def _do_set_take() -> bool: f"Setting take on [{COLOR_PALETTE['GENERAL']['LINKS']}]network: {subtensor.network}" ) - if ( - not unlock_key(wallet, "hot").success - and unlock_key(wallet, "cold").success - ): + if not unlock_key(wallet, "hot").success and unlock_key(wallet, "cold").success: return False result_ = await _do_set_take()