Core: fix bug with missing help text (#5632)

Co-authored-by: Duck <31627079+duckboycool@users.noreply.github.com>
This commit is contained in:
Doug Hoskisson
2026-01-19 11:13:43 -08:00
committed by GitHub
parent 9f71fe707f
commit 092a9dc6bd

View File

@@ -1364,7 +1364,10 @@ class CommandProcessor(metaclass=CommandMeta):
argname += "=" + parameter.default
argtext += argname
argtext += " "
doctext = '\n '.join(inspect.getdoc(method).split('\n'))
method_doc = inspect.getdoc(method)
if method_doc is None:
method_doc = "(missing help text)"
doctext = "\n ".join(method_doc.split("\n"))
s += f"{self.marker}{command} {argtext}\n {doctext}\n"
return s