From 92730c284a7e88468937540cc0fd874d7b277b0f Mon Sep 17 00:00:00 2001 From: Vincent A Date: Sun, 3 Mar 2019 15:26:39 +0100 Subject: [PATCH] weboob.tools.application: use more docstring instead of comments X-Target-Branch: argparse --- weboob/tools/application/base.py | 26 +++++++++++++++++--------- weboob/tools/application/repl.py | 2 +- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/weboob/tools/application/base.py b/weboob/tools/application/base.py index c2a28bbad0..1907cb7adf 100644 --- a/weboob/tools/application/base.py +++ b/weboob/tools/application/base.py @@ -85,25 +85,33 @@ class Application(object): # ------ Class attributes -------------------------------------- - # Application name APPNAME = '' - # Configuration and work directory (if None, use the Weboob instance one) + """Application name""" + CONFDIR = None - # Default configuration dict (can only contain key/values) + """Configuration and work directory (if None, use the Weboob instance one)""" + CONFIG = {} - # Default storage tree + """Default configuration dict (can only contain key/values)""" + STORAGE = {} - # Synopsis + """Default storage tree""" + SYNOPSIS = 'Usage: %prog [-h] [-dqv] [-b backends] ...\n' SYNOPSIS += ' %prog [--help] [--version]' - # Description + """Synopsis""" + DESCRIPTION = None - # Version + """Description""" + VERSION = None - # Copyright + """Version""" + COPYRIGHT = None - # Verbosity of DEBUG + """Copyright""" + DEBUG_FILTER = 2 + """Verbosity of DEBUG""" stdin = sys.stdin stdout = sys.stdout diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index 7225095099..d68b6e590f 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -121,8 +121,8 @@ class ReplApplication(ConsoleApplication, MyCmd): DEFAULT_FORMATTER = 'multiline' COMMANDS_FORMATTERS = {} - # Objects to allow in do_ls / do_cd COLLECTION_OBJECTS = tuple() + """Objects to allow in do_ls / do_cd""" weboob_commands = set(['backends', 'condition', 'count', 'formatter', 'logging', 'select', 'quit', 'ls', 'cd']) hidden_commands = set(['EOF']) -- GitLab