Skip to content

Conversation

@radarhere
Copy link
Member

No description provided.

Tests/helper.py Outdated
assert a.size == b.size, msg or f"got size {repr(a.size)}, expected {repr(b.size)}"
if a.tobytes() != b.tobytes():
if HAS_UPLOADER:
if uploader:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if is probably no longer needed since it is now checked in the upload function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this condition was removed, then the logger.error on line 97 would always run, and similarly, the logger.exception on line 136 would always run.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it shouldn't run if there is no url returned?
If uploader = "show", that logger message is probably also undesirable.

url = upload(a, b)
if url:
    logger.error("URL for test images: %s", url)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've pushed f7701e6 for this.

Tests/helper.py Outdated
)
except Exception as e:
if HAS_UPLOADER:
if uploader:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this if.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've pushed f7701e6 for this.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added some hints to this file yesterday but hadn't opened the PR yet :) The good news is we can combine these!

radarhere and others added 4 commits January 20, 2024 21:23
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Comment on lines +49 to +50
elif uploader == "aws":
return test_image_results.upload(a, b)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope for this PR, but if the AWS Lambda is long gone, shall we remove this stuff?

wiredfool/test-image-results#1 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've created #7739 to remove it.

@hugovk hugovk mentioned this pull request Jan 20, 2024
@radarhere radarhere merged commit 6fe683b into python-pillow:main Jan 21, 2024
@radarhere radarhere deleted the type_hints_helper branch January 21, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants