MCPcopy Create free account
hub / github.com/pyinvoke/invoke / decode

Method decode

invoke/runners.py:1037–1045  ·  view source on GitHub ↗

Decode some ``data`` bytes, returning Unicode. .. versionadded:: 1.0

(self, data: bytes)

Source from the content-addressed store, hash-verified

1035 self._write_proc_stdin(data.encode(self.encoding))
1036
1037 def decode(self, data: bytes) -> str:
1038 """
1039 Decode some ``data`` bytes, returning Unicode.
1040
1041 .. versionadded:: 1.0
1042 """
1043 # NOTE: yes, this is a 1-liner. The point is to make it much harder to
1044 # forget to use 'replace' when decoding :)
1045 return data.decode(self.encoding, "replace")
1046
1047 @property
1048 def process_is_finished(self) -> bool:

Callers 2

read_proc_outputMethod · 0.95
read_our_stdinMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected