From bda751a1364bb396c0c690a2e83d781cdfd880be Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Fri, 31 Jul 2020 00:27:52 -0400 Subject: Fix a couple doc8 warnings --- docs/features/modular_commands.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docs/features') diff --git a/docs/features/modular_commands.rst b/docs/features/modular_commands.rst index 3ead40ee..4c7286b7 100644 --- a/docs/features/modular_commands.rst +++ b/docs/features/modular_commands.rst @@ -13,7 +13,8 @@ add additional capabilities. Features ~~~~~~~~ -* Modular Command Sets - Commands can be broken into separate modules rather than in one god class holding all commands. +* Modular Command Sets - Commands can be broken into separate modules rather than in one god class holding all + commands. * Automatic Command Discovery - In your application, merely defining and importing a CommandSet is sufficient for cmd2 to discover and load your command. No manual registration is necessary. * Dynamically Loadable/Unloadable Commands - Command functions and CommandSets can both be loaded and unloaded @@ -211,10 +212,11 @@ Description ~~~~~~~~~~~ Using the `with_argparse` decorator, it is possible to define subcommands for your command. This has a tendency to either drive your interface into an object-centric interface. For example, imagine you have a tool that manages your -media collection and you want to manage movies or shows. An object-centric approach would push you to have base commands -such as `movies` and `shows` which each have subcommands `add`, `edit`, `list`, `delete`. If you wanted to present an -action-centric command set, so that `add`, `edit`, `list`, and `delete` are the base commands, you'd have to organize -your code around these similar actions rather than organizing your code around similar objects being managed. +media collection and you want to manage movies or shows. An object-centric approach would push you to have base +commands such as `movies` and `shows` which each have subcommands `add`, `edit`, `list`, `delete`. If you wanted to +present an action-centric command set, so that `add`, `edit`, `list`, and `delete` are the base commands, you'd have +to organize your code around these similar actions rather than organizing your code around similar objects being +managed. Subcommand injection allows you to inject subcommands into a base command to present an interface that is sensible to a user while still organizing your code in whatever structure make more logical sense to the developer. -- cgit v1.2.1