MCPcopy Index your code
hub / github.com/wechaty/python-wechaty / save_setting

Method save_setting

src/wechaty/utils/data_util.py:97–101  ·  view source on GitHub ↗

update the plugin setting

(self, value: dict)

Source from the content-addressed store, hash-verified

95 return data
96
97 def save_setting(self, value: dict) -> None:
98 """update the plugin setting"""
99 with open(self.setting_file, 'w', encoding='utf-8') as f:
100 json.dump(value, f, ensure_ascii=False)
101 self.data = value
102
103 def __setitem__(self, key: str, value: Any) -> None:
104 """triggered by `data[key] = value`"""

Callers 5

_init_settingMethod · 0.95
__setitem__Method · 0.95
test_simple_initMethod · 0.95
test_sub_settingMethod · 0.95
settingMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_simple_initMethod · 0.76
test_sub_settingMethod · 0.76