Commit 1a11c9d5 authored by ∞'s avatar 💻

Documentation override fix for nested magic commands

parent df7b4be4
Pipeline #6500 passed with stages
in 42 seconds
......@@ -32,7 +32,7 @@ class GroupDocDescriptor:
if isinstance(cmd, Group):
doc = cmd.doc.split('\n')[0]
else:
doc = inspect.getdoc(cmd.target)
doc = getattr(cmd, '_doc', inspect.getdoc(cmd.target))
if doc:
line += doc.split('\n')[0]
......@@ -101,7 +101,7 @@ class Group(Callable, BaseGroup):
Callable.__init__(self, name, help, color=color, options=options)
self.add_help()
if doc:
self.doc = doc
self._doc = doc
@classmethod
def factory(cls, name, module_name):
......
......@@ -181,6 +181,8 @@ class Callable(Importable):
super().__init__(name, target, module=module)
self.color = color or YELLOW
self.options = options or collections.OrderedDict()
if doc:
self._doc = doc
@classmethod
def for_callback(cls, cb):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment