mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 08:12:33 +03:00
Replace slice and comparison with startswith
This commit is contained in:
parent
26be2ee1e4
commit
8eba937d99
|
@ -12,7 +12,7 @@ from PIL._binary import o32le as o32
|
|||
|
||||
|
||||
def _accept(prefix: bytes) -> bool:
|
||||
return prefix[:4] == b"RIFF"
|
||||
return prefix.startswith(b"RIFF")
|
||||
|
||||
|
||||
def _save_frame(im: Image.Image, fp: BytesIO, info: dict[str, Any]) -> None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user