Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Murray <[email protected]>
  • Loading branch information
akx and radarhere authored Nov 13, 2023
1 parent 126bc44 commit f47633a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/PIL/IcnsImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ def _accept(prefix):
with open(sys.argv[1], "rb") as fp:
imf = IcnsImageFile(fp)
for size in imf.info["sizes"]:
w, h, x = imf.size = size
imf.save(f"out-{w}-{h}-{x}.png")
width, height, scale = imf.size = size
imf.save(f"out-{width}-{height}-{scale}.png")
with Image.open(sys.argv[1]) as im:
im.save("out.png")
if sys.platform == "windows":
Expand Down
4 changes: 2 additions & 2 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3100,8 +3100,8 @@ def fromarray(obj, mode=None):
try:
mode, rawmode = _fromarray_typemap[typekey]
except KeyError as e:
typ_shape, typ_type = typekey
msg = f"Cannot handle this data type: {typ_shape}, {typ_type}"
typekey_shape, typestr = typekey
msg = f"Cannot handle this data type: {typekey_shape}, {typestr}"
raise TypeError(msg) from e
else:
rawmode = mode
Expand Down

0 comments on commit f47633a

Please sign in to comment.