Skip to content

Commit

Permalink
Use 'key in mydict' instead of 'key in mydict.keys()'
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jan 7, 2023
1 parent aa9174f commit ff9e844
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/test_file_png.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def test_roundtrip_private_chunk(self):

def test_textual_chunks_after_idat(self):
with Image.open("Tests/images/hopper.png") as im:
assert "comment" in im.text.keys()
assert "comment" in im.text
for k, v in {
"date:create": "2014-09-04T09:37:08+03:00",
"date:modify": "2014-09-04T09:37:08+03:00",
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ def _save(im, fp, filename):
if isinstance(info, ImageFileDirectory_v1):
info = info.to_v2()
for key in info:
if isinstance(info, Image.Exif) and key in TiffTags.TAGS_V2_GROUPS.keys():
if isinstance(info, Image.Exif) and key in TiffTags.TAGS_V2_GROUPS:
ifd[key] = info.get_ifd(key)
else:
ifd[key] = info.get(key)
Expand Down

0 comments on commit ff9e844

Please sign in to comment.