diff options
| author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-04-10 10:23:30 +0200 | 
|---|---|---|
| committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2021-04-10 10:23:30 +0200 | 
| commit | f1921e8b8a25ca214899c79efa46ca59bd3141b9 (patch) | |
| tree | 7e74c46543d082eadce88a563e3245eb6d3de95b | |
| parent | 3ea722f84b0cc91d4a076553afbe365a13912435 (diff) | |
Use the full docstring as the description for subparsers
| -rw-r--r-- | lesana/command.py | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/lesana/command.py b/lesana/command.py index 1dc9add..564b7e1 100644 --- a/lesana/command.py +++ b/lesana/command.py @@ -29,7 +29,11 @@ class MainCommand:          self.subparsers = self.parser.add_subparsers()          for name, sub in self.commands:              sub_help = _get_first_docstring_line(sub) -            s_parser = self.subparsers.add_parser(name, help=sub_help, description=sub_help) +            s_parser = self.subparsers.add_parser( +                name, +                help=sub_help, +                description=sub.__doc__, +            )              for arg in sub.arguments:                  s_parser.add_argument(*arg[0], **arg[1])              s_parser.set_defaults(func=sub._main)  | 
