MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / seek

Method seek

dwave/cloud/upload.py:268–278  ·  view source on GitHub ↗
(self, pos, whence=os.SEEK_SET)

Source from the content-addressed store, hash-verified

266 self._size = len(raw)
267
268 def seek(self, pos, whence=os.SEEK_SET):
269 if whence == os.SEEK_SET:
270 self._pos = pos
271 elif whence == os.SEEK_CUR:
272 self._pos += pos
273 elif whence == os.SEEK_END:
274 self._pos = self._size + pos
275 else:
276 raise ValueError("whence must be one of 'io.SEEK_{SET,CUR,END}'")
277
278 return self._pos
279
280 def tell(self):
281 return self._pos

Callers 15

test_file_interfaceMethod · 0.95
__init__Method · 0.80
getintoMethod · 0.80
get_answer_dataMethod · 0.80
blocking_seekMethod · 0.80
test_chunks_from_bqmMethod · 0.80
test_chunks_from_dqmMethod · 0.80

Calls

no outgoing calls

Tested by 11

test_file_interfaceMethod · 0.76
blocking_seekMethod · 0.64
test_chunks_from_bqmMethod · 0.64
test_chunks_from_dqmMethod · 0.64
test_file_loggingMethod · 0.64