From c70a45eb935dc536ce59ec860c17b4c1c531a663 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 22 Mar 2019 15:42:45 +0100 Subject: Convert some comments to module docstrings in utilities This makes running pydoc(3) on the utilities helpful. Reuse the module docstring for the --help text for utilities that use argparse. Also fix some copy-paste errors in the all*config.py descriptions and clean up the language a bit. Piggyback removal of an optimization in allmodconfig.py that's pretty irrelevant now. --- setconfig.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'setconfig.py') diff --git a/setconfig.py b/setconfig.py index 60ee9d0..dce9950 100755 --- a/setconfig.py +++ b/setconfig.py @@ -3,16 +3,7 @@ # Copyright (c) 2019, Ulf Magnusson # SPDX-License-Identifier: ISC -import argparse -import sys - -import kconfiglib - - -def main(): - parser = argparse.ArgumentParser( - formatter_class=argparse.RawDescriptionHelpFormatter, - description=""" +""" Simple utility for setting configuration values from the command line. Sample usage: @@ -25,7 +16,18 @@ The exit status on errors is 1. The default input/output configuration file is '.config'. A different filename can be passed in the KCONFIG_CONFIG environment variable. -""") +""" + +import argparse +import sys + +import kconfiglib + + +def main(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=__doc__) parser.add_argument( "--kconfig", -- cgit v1.2.3