From 280b4e9e1adab91ec31a9b30908aaaa75be6c3be Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 16 Apr 2022 22:15:21 +1000 Subject: [PATCH 1/2] Updated variable name in comment --- src/PIL/SgiImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/SgiImagePlugin.py b/src/PIL/SgiImagePlugin.py index 0ef58cf41..f0207bb77 100644 --- a/src/PIL/SgiImagePlugin.py +++ b/src/PIL/SgiImagePlugin.py @@ -182,7 +182,7 @@ def _save(im, fp, filename): fp.write(struct.pack(">l", pinmax)) fp.write(struct.pack("4s", b"")) # dummy fp.write(struct.pack("79s", img_name)) # truncates to 79 chars - fp.write(struct.pack("s", b"")) # force null byte after imgname + fp.write(struct.pack("s", b"")) # force null byte after img_name fp.write(struct.pack(">l", colormap)) fp.write(struct.pack("404s", b"")) # dummy From e4b39d9cc74f26dad1f5cad0851645cc2cd5356d Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 16 Apr 2022 22:15:48 +1000 Subject: [PATCH 2/2] Variable in function should be snake_case --- src/PIL/ImageFilter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PIL/ImageFilter.py b/src/PIL/ImageFilter.py index af33c547e..e10c6fdf1 100644 --- a/src/PIL/ImageFilter.py +++ b/src/PIL/ImageFilter.py @@ -421,8 +421,8 @@ class Color3DLUT(MultibandFilter): except TypeError: size = (size, size, size) size = [int(x) for x in size] - for size1D in size: - if not 2 <= size1D <= 65: + for size_1d in size: + if not 2 <= size_1d <= 65: raise ValueError("Size should be in [2, 65] range.") return size