INNER CODE UNIT · Python
get_command
iterative/mlem · mlem/cli/main.py:310
def get_command(self, ctx: Context, cmd_name: str) -> Optional[Command]:
cmd = super().get_command(ctx, cmd_name)
if cmd is not None:
return cmd
for name in self.list_commands(ctx):
cmd = self.get_command(ctx, name)
if (
isinstance(cmd, (MlemCommand, MlemGroup))
and cmd.aliases
and cmd_name in cmd.aliases
):
return cmd
return None
@property
def help(self):
cmd_name = self._get_cmd_name_for_docs_link()
if "/" in cmd_name: