MCPcopy
hub / github.com/omkarcloud/botasaurus / refresh

Method refresh

botasaurus/local_storage.py:29–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 self.refresh()
28
29 def refresh(self):
30 self.json_path = relative_path("local_storage.json")
31 self.json_data = {}
32
33 if not os.path.isfile(self.json_path):
34 self.commit_to_disk()
35
36 with open(self.json_path, "r") as json_file:
37 self.json_data = json.load(json_file)
38
39 def commit_to_disk(self):
40 with open(self.json_path, "w") as json_file:

Callers 1

__init__Method · 0.95

Calls 3

commit_to_diskMethod · 0.95
relative_pathFunction · 0.70
loadMethod · 0.45

Tested by

no test coverage detected