From 5101846323367db0cf0aca8743b20837d631b0ba Mon Sep 17 00:00:00 2001 From: Florian Strzelecki Date: Wed, 20 Mar 2019 14:52:04 +0100 Subject: [PATCH] fix strings and docstrings --- sopel/cli/config.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sopel/cli/config.py b/sopel/cli/config.py index 43e21d6f60..c8a2d29ed3 100644 --- a/sopel/cli/config.py +++ b/sopel/cli/config.py @@ -1,5 +1,5 @@ # coding=utf-8 -"""Sopel Config Command Line Interfaces (CLI): ``sopel-config``""" +"""Sopel Config Command Line Interface (CLI): ``sopel-config``""" from __future__ import unicode_literals, absolute_import, print_function, division import argparse @@ -22,10 +22,10 @@ def build_parser(): # sopel-config list list_parser = subparsers.add_parser( 'list', - help='List available configurations from Sopel\'s homedir', + help="List available configurations from Sopel's homedir", description=""" - List available configurations from Sopel's homedir ({homedir}) with the - extension "{ext}". + List available configurations from Sopel's homedir ({homedir}) + with the extension "{ext}". """.format(homedir=config.DEFAULT_HOMEDIR, ext='.cfg')) list_parser.add_argument( '-e', '--ext', '--extension', @@ -42,15 +42,15 @@ def build_parser(): # sopel-config init init_parser = subparsers.add_parser( 'init', - help='Initialize sopel configuration file', - description='Initialize sopel configuration file') + help='Initialize Sopel configuration file', + description='Initialize Sopel configuration file') utils.add_common_arguments(init_parser) # sopel-config get
get_parser = subparsers.add_parser( 'get', - help='Get a configuration option\'s value', - description='Get a configuration option\'s value', + help="Get a configuration option's value", + description="Get a configuration option's value", ) get_parser.add_argument('section') get_parser.add_argument('option') @@ -62,7 +62,8 @@ def build_parser(): def handle_list(options): """Display a list of configuration available from Sopel's homedir - :param options: argument parser's parsed option + :param options: parsed arguments + :type options: ``argparse.Namespace`` This command displays an unordered list of config names from Sopel's default homedir, without their extensions:: @@ -91,12 +92,13 @@ def handle_list(options): def handle_init(options): """Use config wizard to initialize a new configuration file for the bot - :param options: argument parser's parsed options + :param options: parsed arguments + :type options: ``argparse.Namespace`` .. note:: Due to how the config wizard works, the configuration filename's - extension must be ``.cfg``. + extension **must be** ``.cfg``. """ config_filename = utils.find_config(