| 1699 | ) |
| 1700 | |
| 1701 | def to_info_dict(self, ctx: Context) -> dict[str, t.Any]: |
| 1702 | info_dict = super().to_info_dict(ctx) |
| 1703 | commands = {} |
| 1704 | |
| 1705 | for name in self.list_commands(ctx): |
| 1706 | command = self.get_command(ctx, name) |
| 1707 | |
| 1708 | if command is None: |
| 1709 | continue |
| 1710 | |
| 1711 | sub_ctx = ctx._make_sub_context(command) |
| 1712 | |
| 1713 | with sub_ctx.scope(cleanup=False): |
| 1714 | commands[name] = command.to_info_dict(sub_ctx) |
| 1715 | |
| 1716 | info_dict.update(commands=commands, chain=self.chain) |
| 1717 | return info_dict |
| 1718 | |
| 1719 | def add_command(self, cmd: Command, name: str | None = None) -> None: |
| 1720 | """Registers another :class:`Command` with this group. If the name |