refactor(runner): simplify command help text generation
This commit is contained in:
@@ -183,10 +183,7 @@ class CliRunner:
|
|||||||
|
|
||||||
def _format_commands_help(self) -> str:
|
def _format_commands_help(self) -> str:
|
||||||
"""格式化命令帮助文本."""
|
"""格式化命令帮助文本."""
|
||||||
lines = ["可用命令:"]
|
return "可用命令:\n" + " | ".join(self.graphs.keys())
|
||||||
for cmd in self.graphs:
|
|
||||||
lines.append(f" {cmd}")
|
|
||||||
return "\n".join(lines)
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------ #
|
# ------------------------------------------------------------------ #
|
||||||
# 执行
|
# 执行
|
||||||
|
|||||||
Reference in New Issue
Block a user