MCPcopy Create free account
hub / github.com/ahalev/python-microgrid / flush

Method flush

src/pymgrid/utils/logger.py:12–16  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10 self._log_length = max(len(v) for _, v in self.items()) if len(self.data) else 0
11
12 def flush(self):
13 d = self.data.copy()
14 self.clear()
15 self._log_length = 0
16 return d
17
18 def log(self, log_dict=None, **log_items):
19 if log_items:

Callers 3

resetMethod · 0.80
run_rule_basedMethod · 0.80
resetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected