ExitCliCommand#

class wattson.cosimulation.cli.commands.exit_cli_command.ExitCliCommand(cli: CLI)#

Bases: CliCommandHandler

Methods

__init__

auto_complete_choices

Generates a nested dictionary that provides all possible auto complete options.

description

handle_command

Gets a command divided into a list to apply the respective actions

help

Returns the help string to be printed in result of a help XY command.

__init__(cli: CLI)#
auto_complete_choices(prefix: List[str], level: int | None = None) dict#

Generates a nested dictionary that provides all possible auto complete options. In case a level is given, the dictionary’s nesting level can be restricted to this level.

Parameters:
  • prefix (List[str]) – The command prefix that is relevant for this auto completion

  • level (Optional[int], optional) – Optional restriction of the maximum nesting level of the dictionary that allows to skip non-static command completions on lower nesting levels (Default value = None)

Returns:

A nested dictionary with auto complete options. Each dictionary key is a string that contains no spaces

Return type:

dict

handle_command(command: List[str], prefix: List[str]) bool#

Gets a command divided into a list to apply the respective actions

Parameters:
  • command (List[str]) – The command split into a list at spaces

  • prefix (List[str]) – The command’s prefix. Original input is ‘prefix command’

Returns:

True iff the CLI should continue to prompt for the next command

Return type:

bool

help(prefix: List[str], subcommand: List[str] | None = None) str | None#

Returns the help string to be printed in result of a help XY command. In case the help-page is requested for a subcommand, the respective command is provided as a list as the first argument

Parameters:
  • prefix (List[str]) – The command’s prefix

  • subcommand (Optional[List[str]], optional) – The optionally requested subcommand (Default value = None)

Returns:

The help text for the requested command

Return type:

Optional[str]