Gets short help for the command or makes it by shortening the long help string.
(self, limit: int = 45)
| 1192 | return formatter.getvalue().rstrip("\n") |
| 1193 | |
| 1194 | def get_short_help_str(self, limit: int = 45) -> str: |
| 1195 | """Gets short help for the command or makes it by shortening the |
| 1196 | long help string. |
| 1197 | """ |
| 1198 | if self.short_help: |
| 1199 | text = inspect.cleandoc(self.short_help) |
| 1200 | elif self.help: |
| 1201 | text = make_default_short_help(self.help, limit) |
| 1202 | else: |
| 1203 | text = "" |
| 1204 | |
| 1205 | if self.deprecated: |
| 1206 | text = f"{_(text)} {_format_deprecated_label(self.deprecated)}" |
| 1207 | |
| 1208 | return text.strip() |
| 1209 | |
| 1210 | def format_help(self, ctx: Context, formatter: HelpFormatter) -> None: |
| 1211 | """Writes the help into the formatter if it exists. |
no test coverage detected