Generate a RichTextLines object that describes a recommended command. Args: command: (str) The command to recommend. description: (str) A description of what the command does. indent: (int) How many spaces to indent in the beginning. create_link: (bool) Whether a command link is t
(command, description, indent=2, create_link=False)
| 231 | |
| 232 | |
| 233 | def _recommend_command(command, description, indent=2, create_link=False): |
| 234 | """Generate a RichTextLines object that describes a recommended command. |
| 235 | |
| 236 | Args: |
| 237 | command: (str) The command to recommend. |
| 238 | description: (str) A description of what the command does. |
| 239 | indent: (int) How many spaces to indent in the beginning. |
| 240 | create_link: (bool) Whether a command link is to be applied to the command |
| 241 | string. |
| 242 | |
| 243 | Returns: |
| 244 | (RichTextLines) Formatted text (with font attributes) for recommending the |
| 245 | command. |
| 246 | """ |
| 247 | |
| 248 | indent_str = " " * indent |
| 249 | |
| 250 | if create_link: |
| 251 | font_attr = [debugger_cli_common.MenuItem("", command), "bold"] |
| 252 | else: |
| 253 | font_attr = "bold" |
| 254 | |
| 255 | lines = [RL(indent_str) + RL(command, font_attr) + ":", |
| 256 | indent_str + " " + description] |
| 257 | |
| 258 | return debugger_cli_common.rich_text_lines_from_rich_line_list(lines) |
| 259 | |
| 260 | |
| 261 | def get_tfdbg_logo(): |
no outgoing calls
no test coverage detected