MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / _config

Method _config

scripts/compile_to_inline_config_test.py:119–125  ·  view source on GitHub ↗
(self, name: str, body: str)

Source from the content-addressed store, hash-verified

117 self._tmp.cleanup()
118
119 def _config(self, name: str, body: str) -> Path:
120 path = self.config_dir / name
121 path.write_text(
122 f'{{"name": "{name}", "conversion_chain": [{{"dict": {body}}}]}}',
123 encoding="utf-8",
124 )
125 return path
126
127 def _dict(self, compiled) -> dict:
128 return compiled["conversion_chain"][0]["dict"]

Calls

no outgoing calls

Tested by

no test coverage detected