MCPcopy Index your code
hub / github.com/python-pillow/Pillow / _seek_check

Method _seek_check

src/PIL/ImageFile.py:455–468  ·  view source on GitHub ↗
(self, frame: int)

Source from the content-addressed store, hash-verified

453 # pass
454
455 def _seek_check(self, frame: int) -> bool:
456 if (
457 frame < self._min_frame
458 # Only check upper limit on frames if additional seek operations
459 # are not required to do so
460 or (
461 not (hasattr(self, "_n_frames") and self._n_frames is None)
462 and frame >= getattr(self, "n_frames") + self._min_frame
463 )
464 ):
465 msg = "attempt to seek outside sequence"
466 raise EOFError(msg)
467
468 return self.tell() != frame
469
470
471class StubHandler(abc.ABC):

Callers 12

seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80
seekMethod · 0.80

Calls 1

tellMethod · 0.45

Tested by

no test coverage detected