MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / get_bytes

Method get_bytes

tests/conftest.py:209–214  ·  view source on GitHub ↗

Get the output as-if no encoding occurred

(self)

Source from the content-addressed store, hash-verified

207 self._stream = stream
208
209 def get_bytes(self) -> bytes:
210 """Get the output as-if no encoding occurred"""
211 data = self._stream.getvalue()
212 self._stream.seek(0)
213 self._stream.truncate()
214 return data.replace(b'\r\n', b'\n')
215
216 def get(self) -> str:
217 """Get the output assuming it was written as UTF-8 bytes"""

Callers 2

getMethod · 0.95
_do_runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected