diff --git a/dargs/dargs.py b/dargs/dargs.py index 20930eb..caf8dc6 100644 --- a/dargs/dargs.py +++ b/dargs/dargs.py @@ -952,12 +952,15 @@ def gen_doc_flag(self, path: list[str] | None = None, **kwargs) -> str: choicedoc = indent("| possible choices: " + ", ".join(l_choice), INDENT) realdoc = indent(self.doc + "\n", INDENT) if self.doc else None anchor = make_rst_refid(arg_path) if kwargs.get("make_anchor") else None - abstractdoc = "\n".join( - [ - f"* {ll}: {cc.doc}" - for ll, cc in zip(l_choice, self.choice_dict.values()) - if cc.doc - ] + abstractdoc = indent( + "\n".join( + [ + f"* {ll}: {cc.doc}" + for ll, cc in zip(l_choice, self.choice_dict.values()) + if cc.doc + ] + ), + INDENT, ) allparts = [ anchor,