Skip to content
Open
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
22 changes: 11 additions & 11 deletions bittensor_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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
"""
Expand All @@ -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
"""
Expand All @@ -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")
Expand Down Expand Up @@ -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}[/]"
Expand Down Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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()

Expand Down