INNER CODE UNIT · Python
collect_usage_pieces
iterative/mlem · mlem/cli/main.py:84
def collect_usage_pieces(self, ctx: Context) -> List[str]:
return [p.lower() for p in super().collect_usage_pieces(ctx)]
def get_help(self, ctx: Context) -> str:
"""Formats the help into a string and returns it.
Calls :meth:`format_help` internally.
"""
formatter = MlemFormatter(
width=ctx.terminal_width, max_width=ctx.max_content_width
)
self.format_help(ctx, formatter)
return formatter.getvalue().rstrip("\n")
def _get_cmd_name_for_docs_link(self):
ctx = click.get_current_context()
return get_cmd_name(ctx, no_aliases=True, sep="/")