Skip to content

Commit ee7da74

Browse files
committed
commit right version this time :-)
1 parent df98e2a commit ee7da74

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

mx_commands.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,13 @@ def command_function(self):
126126
return self._command_function
127127

128128
def get_doc(self):
129+
doc = self.command_function.__doc__
130+
format_args = []
131+
if self.usage_msg:
132+
format_args.append(self.usage_msg)
129133
if self.doc_function:
130-
return doc_function()
131-
return ''
134+
format_args.append(self.doc_function())
135+
return doc.format(*format_args)
132136

133137
def __call__(self, *args, **kwargs):
134138
for callback in self._mx_commands.command_before_callbacks:

0 commit comments

Comments
 (0)