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

Added type hints #8132

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Added type hints #8132

merged 1 commit into from
Jun 11, 2024

Conversation

radarhere
Copy link
Member

No description provided.

self.close()
return False # do not suppress exceptions
Copy link
Member Author

Choose a reason for hiding this comment

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

https://python.readthedocs.io/en/latest/reference/datamodel.html#object.__exit__

If an exception is supplied, and the method wishes to suppress the exception (i.e., prevent it from being propagated), it should return a true value. Otherwise, the exception will be processed normally upon exit from this method.

So False and None will have the same result.

@hugovk hugovk merged commit 114e017 into python-pillow:main Jun 11, 2024
54 of 56 checks passed
@radarhere radarhere deleted the type_hint branch June 11, 2024 22:40
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.

2 participants