Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed list of single items dictionaries to dictionary #10

Merged
merged 5 commits into from Dec 30, 2020

Conversation

radarhere
Copy link

Hi. Some suggestions for python-pillow#5144. Take them or leave them.

  • Use context manager - It closes the image once the test is done with it
  • Use isinstance to check type - It just seems simpler
  • Check string value - To be more thorough
  • Renamed variable - 'xmp_atribs' to 'xmp_attribs', being more consistent with 'element.attrib'
  • Changed list of single item dictionaries to dictionary - meaning the test (and users) can refer to im.getxmp()["Description"]["Version"] instead of im.getxmp()["Description"][0]["Version"], which seems simpler, unless there's something I'm not aware of?

@UrielMaD UrielMaD merged commit 0084234 into UrielMaD:feature_xmp Dec 30, 2020
@radarhere radarhere deleted the feature_xmp branch December 30, 2020 23:12
@UrielMaD
Copy link
Owner

Changes does look good for me, it's a good enhancement! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants