INNER CODE UNIT · Python
limit
iterative/mlem · mlem/cli/main.py:287
limit = formatter.width - 6 - max(len(cmd[0]) for cmd in commands)
sections = defaultdict(list)
for subcommand, cmd in commands:
help = cmd.get_short_help_str(limit)
if isinstance(cmd, (MlemCommand, MlemGroup)):
section = cmd.section
aliases = (
f" ({','.join(cmd.aliases)})" if cmd.aliases else ""
)
else:
section = "other"
aliases = ""
sections[section].append((subcommand + aliases, help))
for section in self.order:
if sections[section]: