Skip to content

Commit

Permalink
Fix mypy issue when using newer odc-geo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill888 committed Oct 5, 2023
1 parent b5a3c48 commit 1668544
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions odc/stac/_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def dst_roi(self):
@property
def dst_gbox(self) -> GeoBox:
_, y, x = self.idx_tyx
return self.gbt[y, x]
return cast(GeoBox, self.gbt[y, x])


class _DaskGraphBuilder:
Expand Down Expand Up @@ -665,7 +665,7 @@ def _dask_loader_tyx(
env: Dict[str, Any],
):
assert cfg.dtype is not None
gbox = gbt[iyx]
gbox = cast(GeoBox, gbt[iyx])
chunk = np.empty(gbox.shape.yx, dtype=cfg.dtype)
with rio_env(**env):
return _fill_2d_slice(srcs, gbox, cfg, chunk)[np.newaxis]
Expand Down

0 comments on commit 1668544

Please sign in to comment.