Skip to content

Commit 66da1b1

Browse files
ci(pre-commit.ci): autoupdate (#104)
* ci(pre-commit.ci): autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.10 → v0.11.12](astral-sh/ruff-pre-commit@v0.11.10...v0.11.12) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.0](pre-commit/mirrors-mypy@v1.15.0...v1.16.0) * fix --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert <[email protected]>
1 parent fb69861 commit 66da1b1

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
args: [--autofix]
1616

1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.11.10
18+
rev: v0.12.2
1919
hooks:
2020
- id: ruff
2121
args: [--fix, --unsafe-fixes]
@@ -29,7 +29,7 @@ repos:
2929
- id: validate-pyproject
3030

3131
- repo: https://github.com/pre-commit/mirrors-mypy
32-
rev: v1.15.0
32+
rev: v1.16.1
3333
hooks:
3434
- id: mypy
3535
files: "^src/"

src/cmap/_catalog.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ def _build_catalog(records: Iterable[FileDescriptorOrPath]) -> CatalogDict:
165165
ctlg[name] = v # FIXME
166166
continue
167167

168-
# otherwise we have a CatalogItem
169-
v = cast("UnloadedCatalogItem", v)
170-
171168
# here we add any global keys to the colormap that are not already there.
172169
for k in ("license", "namespace", "source", "authors", "category"):
173170
if k in data:
@@ -376,7 +373,7 @@ def _load(self, normed_key: str) -> CatalogItem:
376373
)
377374
return self[namespaced]
378375

379-
_item = cast("UnloadedCatalogItem", item.copy())
376+
_item = item.copy()
380377
# if a string, it is a module:attribute reference to a ColormapLike object
381378
# load it here.
382379
if isinstance(_item["data"], str):

src/cmap/_colormap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ def _call_lut_func(self, X: np.ndarray) -> np.ndarray:
899899
colors = np.concatenate([colors, np.ones((len(X), 1))], axis=1)
900900
elif colors.shape[1] != 4:
901901
raise ValueError("lut_func must return RGB or RGBA values")
902-
return cast("np.ndarray", colors)
902+
return colors
903903

904904
@classmethod
905905
def parse(cls, colors: ColormapLike) -> ColorStops:
@@ -1523,4 +1523,4 @@ def _wrap_shift_color_stops(data: np.ndarray, shift_amount: float) -> np.ndarray
15231523
out[:, 0] %= 1
15241524
# sort the array by the first column
15251525
out = out[out[:, 0].argsort()]
1526-
return out
1526+
return out # type: ignore[no-any-return]

0 commit comments

Comments
 (0)