diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b30a7c1..2f3fb5c3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,26 +3,26 @@ repos: - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.265 + rev: v0.8.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.3.0 hooks: - id: codespell args: [--ignore-words=.codespellignore] types_or: [jupyter, markdown, python, shell] - repo: https://github.com/PyCQA/doc8 - rev: v1.1.1 + rev: v1.1.2 hooks: - id: doc8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.14.0 hooks: - id: mypy # TODO lint test and scripts too diff --git a/src/stactools/core/add_raster.py b/src/stactools/core/add_raster.py index 01570b20..57559fae 100644 --- a/src/stactools/core/add_raster.py +++ b/src/stactools/core/add_raster.py @@ -69,7 +69,10 @@ def _read_bands(href: str, statistics: bool, histogram: bool) -> List[RasterBand data, range=(minimum, maximum), bins=BINS ) band.histogram = Histogram.create( - BINS, minimum, maximum, hist_data.tolist() + BINS, + minimum, + maximum, + hist_data.tolist(), # type: ignore ) bands.append(band) return bands diff --git a/src/stactools/core/utils/raster_footprint.py b/src/stactools/core/utils/raster_footprint.py index ea78f89b..9ef14f84 100644 --- a/src/stactools/core/utils/raster_footprint.py +++ b/src/stactools/core/utils/raster_footprint.py @@ -292,7 +292,7 @@ def data_mask(self) -> npt.NDArray[np.uint8]: mask[~np.isnan(self.data_array)] = 1 else: mask[self.data_array != self.no_data] = 1 - mask = np.sum(mask, axis=0, dtype=np.uint8) + mask = np.sum(mask, axis=0, dtype=np.uint8) # type: ignore mask[mask > 0] = 1 else: mask = np.full(shape, 1, dtype=np.uint8)