-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MAINT: fix mypy type output #2799
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2799 +/- ##
==========================================
- Coverage 95.86% 95.83% -0.03%
==========================================
Files 51 51
Lines 8528 8544 +16
Branches 1691 1692 +1
==========================================
+ Hits 8175 8188 +13
- Misses 209 212 +3
Partials 144 144 ☔ View full report in Codecov by Sentry. |
I am not completely sure about this - using private members in the public API does not feel right. |
Can you please clarify: keys and items are public for _VirtualListImages. However, having a library fully compatible with mypy worth the commit |
In my opinion, it does not make sense to have a type hint referencing |
Based on your comments:
|
Isn't this a breaking change for users which do not have Pillow installed? |
No: the error is reported only when calling replace (as it used to be) There is no change in behavior |
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
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.
I have reworded some of the docs.
Additionally, the ImageFile
and VirtualListImages
classes are still part of a private module only without being exposed in the __init__.py
file. We should expose them there to allow users to actually refer to them in their own type hints if required.
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
ImageFile and VirtualListImages are not classes that a user should create instances from : as such I see no reason for them to be part of the The objective is just to fix mypy and the test report in the issue was positive |
Okay, let's keep this for now - except for the other remark regarding |
closes #2798