-
Notifications
You must be signed in to change notification settings - Fork 89
🔧 mypy
fix typing in pyramid.py
#938
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
base: develop
Are you sure you want to change the base?
Conversation
mypy
fix typing in pyramid.py
mypy
fix typing in pyramid.py
mypy
fix typing in pyramid.py
pyramid.py
pyramid.py
mypy
fix typing in pyramid.py
@@ -399,6 +395,19 @@ def __iter__(self: TilePyramidGenerator) -> Iterator: | |||
for x, y in np.ndindex(self.tile_grid_size(level)): | |||
yield self.get_tile(level=level, x=x, y=y) | |||
|
|||
def _compression_mode_to_literal( |
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.
TarFile.open()
requires mode
to be Literal
type, which means it can not be a normal str
type and it can not be assigned from another variable, it has to be a literal string. I think this is the best way to do it.
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.
@Jiaqi-Lv I fixed this mypy issue yesterday in PR #841, in a way that I think changes less code - take a look and let me know if you think its ok, otherwise we will have some merge issues if we try to merge that PR after this one. That PR is ready for review now anyway, so shouldn't have to wait long to merge it in
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #938 +/- ##
========================================
Coverage 99.69% 99.69%
========================================
Files 71 71
Lines 8934 8943 +9
Branches 1171 1174 +3
========================================
+ Hits 8907 8916 +9
Misses 23 23
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed typing issue in
pyramid.py
.