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

Method decode

tests/utils/__init__.py:97–105  ·  view source on GitHub ↗
(self, data: str)

Source from the content-addressed store, hash-verified

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:
99 return data
100
101 raw_data = data.encode()
102 return self.BYTES_PATTERN.sub(
103 lambda match: self.substitutions[int(match.group(1))],
104 raw_data
105 )
106
107
108class FakeBytesIOBuffer(BytesIO):

Callers 15

smart_decodeFunction · 0.80
decode_raw_argsFunction · 0.80
open_with_lockfileFunction · 0.80
content_typeMethod · 0.80
headersMethod · 0.80
_compute_new_headersMethod · 0.80
pretty_xmlFunction · 0.80
load_text_fileFunction · 0.80
make_headerMethod · 0.80
_installMethod · 0.80
upgradeMethod · 0.80

Calls

no outgoing calls