This commit is contained in:
2019-07-29 22:10:40 +02:00
parent 79ddb8bc11
commit 7fe8cf322d
40 changed files with 30 additions and 22 deletions

View File

@ -1,4 +1,4 @@
from .api import TiramisuCmdlineParser
__version__ = "0.0.1"
__version__ = "0.1"
__all__ = ('TiramisuCmdlineParser',)

View File

@ -154,7 +154,10 @@ class _BuildKwargs:
self.force_no = force_no
self.force_del = force_del
if not self.force_no and not self.force_del:
self.kwargs['help'] = option.doc().replace('%', '%%')
description = option.doc()
if not description:
description = description.replace('%', '%%')
self.kwargs['help'] = description
if 'positional' not in self.properties:
is_short_name = self.cmdlineparser._is_short_name(name, 'longargument' in self.properties)
if self.force_no:
@ -335,7 +338,7 @@ class TiramisuCmdlineParser(ArgumentParser):
continue
if obj.option.isoptiondescription():
if _forhelp:
newgroup = self.add_argument_group(obj.option.path(), obj.option.doc())
newgroup = self.add_argument_group(obj.option.path(), obj.option.description())
else:
newgroup = group
if prefix: