MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _recommend_command

Function _recommend_command

tensorflow/python/debug/cli/cli_shared.py:233–258  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

231
232
233def _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
261def get_tfdbg_logo():

Callers 2

get_run_start_introFunction · 0.85
get_error_introFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected