mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-09-10 06:12:27 +03:00
Use walrus operator
This commit is contained in:
parent
208e9b52dc
commit
e0da1a62ec
|
@ -49,8 +49,7 @@ class WalImageFile(ImageFile.ImageFile):
|
||||||
|
|
||||||
# strings are null-terminated
|
# strings are null-terminated
|
||||||
self.info["name"] = header[:32].split(b"\0", 1)[0]
|
self.info["name"] = header[:32].split(b"\0", 1)[0]
|
||||||
next_name = header[56 : 56 + 32].split(b"\0", 1)[0]
|
if next_name := header[56 : 56 + 32].split(b"\0", 1)[0]:
|
||||||
if next_name:
|
|
||||||
self.info["next_name"] = next_name
|
self.info["next_name"] = next_name
|
||||||
|
|
||||||
def load(self) -> Image.core.PixelAccess | None:
|
def load(self) -> Image.core.PixelAccess | None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user