MCPcopy Create free account
hub / github.com/deskree-inc/blok / replace_object_strings

Method replace_object_strings

runtimes/python3/core/util/mapper.py:10–15  ·  view source on GitHub ↗
(self, obj: ParamsDictionary, ctx: Context, data: ParamsDictionary)

Source from the content-addressed store, hash-verified

8
9class Mapper:
10 def replace_object_strings(self, obj: ParamsDictionary, ctx: Context, data: ParamsDictionary) -> None:
11 for key, value in obj.items():
12 if isinstance(value, str):
13 obj[key] = self.replace_string(value, ctx, data)
14 elif isinstance(value, dict):
15 self.replace_object_strings(value, ctx, data)
16
17 def replace_string(self, str_data: str, ctx: Context, data: ParamsDictionary) -> str:
18 str_ = str_data

Callers 2

blueprintMapperMethod · 0.80

Calls 1

replace_stringMethod · 0.95

Tested by 1