MCPcopy Index your code
hub / github.com/RustPython/RustPython / truncate

Method truncate

Lib/_pyio.py:1266–1271  ·  view source on GitHub ↗
(self, pos=None)

Source from the content-addressed store, hash-verified

1264 return written
1265
1266 def truncate(self, pos=None):
1267 with self._write_lock:
1268 self._flush_unlocked()
1269 if pos is None:
1270 pos = self.raw.tell()
1271 return self.raw.truncate(pos)
1272
1273 def flush(self):
1274 with self._write_lock:

Callers

nothing calls this directly

Calls 3

_flush_unlockedMethod · 0.95
tellMethod · 0.45
truncateMethod · 0.45

Tested by

no test coverage detected