MCPcopy
hub / github.com/zhayujie/CowAgent / get

Method get

config.py:287–301  ·  view source on GitHub ↗
(self, key, default=None)

Source from the content-addressed store, hash-verified

285 return super().__setitem__(key, value)
286
287 def get(self, key, default=None):
288 # skip comment fields starting with an underscore
289 if key.startswith("_"):
290 return super().get(key, default)
291
292 # if the key is not in available_setting, fall back to dict.get and return the value actually loaded from config.json (or default if absent)
293 if key not in available_setting:
294 return super().get(key, default)
295
296 try:
297 return self[key]
298 except KeyError as e:
299 return default
300 except Exception as e:
301 raise e
302
303 # Make sure to return a dictionary to ensure atomic
304 def get_user_data(self, user) -> dict:

Callers 15

load_configFunction · 0.95
get_user_dataMethod · 0.45
_merge_legacy_namespaceFunction · 0.45
get_appdata_dirFunction · 0.45
subscribe_msgFunction · 0.45
pconfFunction · 0.45
get_channelMethod · 0.45
startMethod · 0.45
stopMethod · 0.45
add_channelMethod · 0.45
_clear_singleton_cacheFunction · 0.45
_sync_builtin_skillsFunction · 0.45

Calls

no outgoing calls