MCPcopy Create free account
hub / github.com/bterwijn/memory_graph / add_entry

Method add_entry

memory_graph/html_table.py:66–76  ·  view source on GitHub ↗

Add child to the table either as reference if it is a Node_Base or as a value otherwise.

(self, node, nodes, child, id_to_slices, rounded=False, border=1, dashed=False, embed=False)

Source from the content-addressed store, hash-verified

64 """ Check if a new line should be added to the table, and if so add it and sets the 'add_new_line_flag' to False."""
65 if self.add_new_line_flag:
66 self.add_row()
67 self.add_new_line_flag = False
68
69 def add_index(self, s):
70 """ Add an index s to the table. """
71 self.check_add_new_line()
72 self.add_column(f'<TD BORDER="0"><font color="{config.index_color}">{str(s)}</font></TD>')
73 self.col_count += 1
74
75 def add_entry(self, node, nodes, child, id_to_slices, rounded=False, border=1, dashed=False, embed=False):
76 """ Add child to the table either as reference if it is a Node_Base or as a value otherwise. """
77 child_id = id(child)
78 if not embed and child_id in nodes:
79 child = nodes[child_id]

Callers 5

fill_html_tableMethod · 0.80

Calls 2

add_referenceMethod · 0.95
add_valueMethod · 0.95

Tested by

no test coverage detected