| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This is such a big PR I've not found time to review it yet, so let's either ask for reviewers from the community (for example, via #8029), or just go ahead and merge it if you'd like it in the next release. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Resolves #8029
In order to add type hints to the following Image methods
I've made a few changes.
Image now has
I added an __enter__() and __exit__() to ImageFile, so that with Image.open(...): will type hint an ImageFile instance. I also moved _close_fp() to ImageFile, as it is only used when exiting an ImageFile instance.
I also moved get_child_images() from Image to ImageFile. It requires the use of self.fp, so this made sense to me, but feel to tell me it should stay in Image.
Believe it or not, all the other changes in this PR flowed out from there.