MCPcopy Create free account
hub / github.com/T-duality/PillOCR-python / load

Method load

utils/config_manager.py:18–26  ·  view source on GitHub ↗

Load configuration file

(self)

Source from the content-addressed store, hash-verified

16 self.config_file = os.path.join(config_dir, config_file)
17
18 def load(self):
19 """Load configuration file"""
20 try:
21 if os.path.exists(self.config_file):
22 with open(self.config_file, 'r', encoding='utf-8') as f:
23 return json.load(f)
24 except json.JSONDecodeError as e:
25 raise ValueError(f"配置文件格式错误: {e}")
26 return {}
27
28 def save(self, config):
29 """Save configuration file"""

Callers 2

load_settingsMethod · 0.80
on_provider_changeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected