diff options
author | Eric Lin <anselor@gmail.com> | 2020-06-16 09:40:40 -0400 |
---|---|---|
committer | anselor <anselor@gmail.com> | 2020-08-04 13:38:08 -0400 |
commit | 07321efc8ac8dc5d8276a1c33ed4fa506e24ae6a (patch) | |
tree | 669ccf974bbd196eb1d36a2f13724fe55ab3cb67 | |
parent | 9ad174a173fdc610c661d588c1f42decbb3d7f5e (diff) | |
download | cmd2-git-07321efc8ac8dc5d8276a1c33ed4fa506e24ae6a.tar.gz |
Fixes to sphinx generation
-rw-r--r-- | cmd2/cmd2.py | 2 | ||||
-rw-r--r-- | cmd2/command_definition.py | 2 | ||||
-rw-r--r-- | docs/api/command_definition.rst | 5 | ||||
-rw-r--r-- | docs/api/index.rst | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 310ad32f..40748d51 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -471,7 +471,7 @@ class Cmd(cmd.Cmd): def uninstall_command_set(self, cmdset: CommandSet): """ - Uninstalls an CommandSet and unloads all associated commands + Uninstalls a CommandSet and unloads all associated commands :param cmdset: CommandSet to uninstall """ if cmdset in self._installed_command_sets: diff --git a/cmd2/command_definition.py b/cmd2/command_definition.py index 6996bd9d..1768d86e 100644 --- a/cmd2/command_definition.py +++ b/cmd2/command_definition.py @@ -61,7 +61,7 @@ def _partial_passthru(func: Callable, *args, **kwargs) -> functools.partial: def register_command(cmd_func: Callable[['Cmd', Union['Statement', 'argparse.Namespace']], None]): """ Decorator that allows an arbitrary function to be automatically registered as a command. - If there is a help_ or complete_ function that matches this command, that will also be registered. + If there is a ``help_`` or ``complete_`` function that matches this command, that will also be registered. :param cmd_func: Function to register as a cmd2 command :return: diff --git a/docs/api/command_definition.rst b/docs/api/command_definition.rst new file mode 100644 index 00000000..cfb7082e --- /dev/null +++ b/docs/api/command_definition.rst @@ -0,0 +1,5 @@ +cmd2.command_definition +======================= + +.. automodule:: cmd2.command_definition + :members: diff --git a/docs/api/index.rst b/docs/api/index.rst index cc899ba1..17a25907 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -23,6 +23,7 @@ This documentation is for ``cmd2`` version |version|. argparse_completer argparse_custom constants + command_definition decorators exceptions history |