(
base_command: Group, cmd_name: str, cmd: Command, register: bool = False
)
| 76 | |
| 77 | |
| 78 | def _check_nested_chain( |
| 79 | base_command: Group, cmd_name: str, cmd: Command, register: bool = False |
| 80 | ) -> None: |
| 81 | if not base_command.chain or not isinstance(cmd, Group): |
| 82 | return |
| 83 | |
| 84 | if register: |
| 85 | message = ( |
| 86 | f"It is not possible to add the group {cmd_name!r} to another" |
| 87 | f" group {base_command.name!r} that is in chain mode." |
| 88 | ) |
| 89 | else: |
| 90 | message = ( |
| 91 | f"Found the group {cmd_name!r} as subcommand to another group " |
| 92 | f" {base_command.name!r} that is in chain mode. This is not supported." |
| 93 | ) |
| 94 | |
| 95 | raise RuntimeError(message) |
| 96 | |
| 97 | |
| 98 | def _format_deprecated_label(deprecated: bool | str) -> str: |
no outgoing calls
no test coverage detected
searching dependent graphs…