Skip to content

Commit

Permalink
feat: update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Dec 23, 2024
1 parent dc72be8 commit 8866c1b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/stactools/core/add_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/stactools/core/utils/raster_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8866c1b

Please sign in to comment.