-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added type hints to additional tests #8118
Conversation
Tests/test_image_thumbnail.py
Outdated
@@ -16,7 +16,7 @@ | |||
|
|||
def test_sanity() -> None: | |||
im = hopper() | |||
assert im.thumbnail((100, 100)) is None | |||
assert im.thumbnail((100, 100)) is None # type: ignore[func-returns-value] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this ignore, mypy reports
Tests/test_image_thumbnail.py:19: error: "thumbnail" of "Image" does not return a value (it only ever returns None) [func-returns-value]
assert im.thumbnail((100, 100)) is None
^~~~~~~~~~~~~~~~~~~~~~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this line just be im.thumbnail((100, 100))
, without the assert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I’ve pushed a commit.
5ff7ce3
to
10647e6
Compare
10647e6
to
291ee35
Compare
No description provided.