MCPcopy
hub / github.com/httpie/cli / substitute

Method substitute

tests/utils/__init__.py:92–95  ·  view source on GitHub ↗
(self, data: bytes)

Source from the content-addressed store, hash-verified

90 self.substitutions = {}
91
92 def substitute(self, data: bytes) -> str:
93 idx = hash(data)
94 self.substitutions[idx] = data
95 return self.TEMPLATE.format(idx)
96
97 def decode(self, data: str) -> Union[str, bytes]:
98 if self.STR_PATTERN.search(data) is None:

Callers 1

writeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected