MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / alter_graph_mode_timeformat

Method alter_graph_mode_timeformat

easygraph/readwrite/gexf.py:601–615  ·  view source on GitHub ↗
(self, start_or_end)

Source from the content-addressed store, hash-verified

599 return node_or_edge_data
600
601 def alter_graph_mode_timeformat(self, start_or_end):
602 if self.graph_element.get("mode") == "static":
603 if start_or_end is not None:
604 if isinstance(start_or_end, str):
605 timeformat = "date"
606 elif isinstance(start_or_end, float):
607 timeformat = "double"
608 elif isinstance(start_or_end, int):
609 timeformat = "long"
610 else:
611 raise AssertionError(
612 "timeformat should be of the type int, float or str"
613 )
614 self.graph_element.set("timeformat", timeformat)
615 self.graph_element.set("mode", "dynamic")
616
617 def write(self, fh):
618 if self.prettyprint:

Callers 4

add_nodesMethod · 0.95
add_edgesMethod · 0.95
add_attributesMethod · 0.95
add_spellsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected