From 3b695589055e64659de5699ee22bf88809978eea Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Tue, 8 Mar 2016 09:33:45 +0100 Subject: [PATCH] Use doc string as argparse description --- boxes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boxes.py b/boxes.py index a7dcceb..9664f49 100755 --- a/boxes.py +++ b/boxes.py @@ -515,7 +515,7 @@ def argparseSections(s): class Boxes: def __init__(self): - self.argparser = ArgumentParser() + self.argparser = ArgumentParser(description=self.__doc__) self.argparser.add_argument( "--thickness", action="store", type=float, default=4.0, help="thickness of the material") @@ -1182,7 +1182,7 @@ See --sy for format""") ################################################## class DemoBox(Boxes): - + """A simple fully enclosed box showcasing different finger joints""" def __init__(self): Boxes.__init__(self) self.buildArgParser("x", "y", "h")