mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-03 19:33:07 +03:00
Use unpacking (#9044)
This commit is contained in:
commit
c084bd7d95
|
@ -308,7 +308,7 @@ def unsafe_eval(
|
||||||
|
|
||||||
# build execution namespace
|
# build execution namespace
|
||||||
args: dict[str, Any] = ops.copy()
|
args: dict[str, Any] = ops.copy()
|
||||||
for k in list(options.keys()) + list(kw.keys()):
|
for k in [*options, *kw]:
|
||||||
if "__" in k or hasattr(builtins, k):
|
if "__" in k or hasattr(builtins, k):
|
||||||
msg = f"'{k}' not allowed"
|
msg = f"'{k}' not allowed"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
|
@ -44,7 +44,7 @@ class McIdasImageFile(ImageFile.ImageFile):
|
||||||
raise SyntaxError(msg)
|
raise SyntaxError(msg)
|
||||||
|
|
||||||
self.area_descriptor_raw = s
|
self.area_descriptor_raw = s
|
||||||
self.area_descriptor = w = [0] + list(struct.unpack("!64i", s))
|
self.area_descriptor = w = [0, *struct.unpack("!64i", s)]
|
||||||
|
|
||||||
# get mode
|
# get mode
|
||||||
if w[11] == 1:
|
if w[11] == 1:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user