From 869271b688ee00ba067af7e9909fbd5d80e2bcfd Mon Sep 17 00:00:00 2001 From: Kooltek68 <80048456+travellingsoldier85@users.noreply.github.com> Date: Sun, 15 Mar 2026 09:00:55 +0000 Subject: [PATCH] chore: add return type hints to bittensor_cli/cli.py --- bittensor_cli/cli.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 295232c36..9c23d6cb2 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -641,8 +641,8 @@ def get_creation_data( return mnemonic, seed, json_path, json_password -def config_selector(conf: dict, title: str): - def curses_selector(stdscr): +def config_selector(conf: dict, title: str) -> None: + def curses_selector(stdscr) -> None: """ Enhanced Curses TUI to make selections. """ @@ -698,7 +698,7 @@ def curses_selector(stdscr): return curses.wrapper(curses_selector) -def version_callback(value: bool): +def version_callback(value: bool) -> None: """ Prints the current version/branch-name """ @@ -716,7 +716,7 @@ def version_callback(value: bool): raise typer.Exit() -def commands_callback(value: bool): +def commands_callback(value: bool) -> None: """ Prints a tree of commands for the app """ @@ -726,7 +726,7 @@ def commands_callback(value: bool): raise typer.Exit() -def debug_callback(value: bool): +def debug_callback(value: bool) -> None: if value: debug_file_loc = Path( os.getenv("BTCLI_DEBUG_FILE") @@ -1385,7 +1385,7 @@ def generate_command_tree(self) -> Tree: Generates a rich.Tree of the commands, subcommands, and groups of this app """ - def build_rich_tree(data: dict, parent: Tree): + def build_rich_tree(data: dict, parent: Tree) -> None: for group, content in data.get("groups", {}).items(): group_node = parent.add( f"[bold cyan]{group}[/]" @@ -1939,7 +1939,7 @@ def del_config( with open(self.config_path, "w") as f: safe_dump(self.config, f) - def get_config(self): + def get_config(self) -> None: """ Prints the current config file in a table. """ @@ -2075,7 +2075,7 @@ def config_remove_proxy( print_error(f"Proxy {name} not found in address book.") self.config_get_proxies() - def config_get_proxies(self): + def config_get_proxies(self) -> None: """ Displays the current proxies address book @@ -2224,7 +2224,7 @@ def config_update_proxy( console.print("Proxy updated") self.config_get_proxies() - def config_clear_proxy_book(self): + def config_clear_proxy_book(self) -> None: """ Clears the proxy address book. Use with caution. Really only useful if you have corrupted your proxy address book. @@ -10121,11 +10121,11 @@ def best_connection( ) return True - def run(self): + def run(self) -> None: self.app() -def main(): +def main() -> None: manager = CLIManager() manager.run()