diff --git a/bittensor_cli/src/bittensor/chain_data.py b/bittensor_cli/src/bittensor/chain_data.py index 1b9d87093..5fc29ba5f 100644 --- a/bittensor_cli/src/bittensor/chain_data.py +++ b/bittensor_cli/src/bittensor/chain_data.py @@ -749,7 +749,7 @@ def tao_to_alpha_with_slippage( self, tao: Balance ) -> tuple[Balance, Balance, float]: """ - Returns an estimate of how much Alpha would a staker receive if they stake their tao using the current pool + Returns an estimate of how much Alpha a staker would receive if they stake their tao using the current pool state. Args: @@ -794,7 +794,7 @@ 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 + Returns an estimate of how much TAO a staker would receive if they unstake their alpha using the current pool state. Args: diff --git a/bittensor_cli/version.py b/bittensor_cli/version.py index a843b3016..65e2ca413 100644 --- a/bittensor_cli/version.py +++ b/bittensor_cli/version.py @@ -3,7 +3,10 @@ def version_as_int(version): - core_version = re.match(r"^\d+\.\d+\.\d+", version).group(0) + match = re.match(r"^\d+\.\d+\.\d+", version) + if not match: + raise ValueError(f"Invalid version format: {version}") + core_version = match.group(0) version_split = core_version.split(".") version_info = tuple(int(part) for part in version_split) version_int_base = 1000