diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 05cf6d833..95d2bf2ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: [--autofix] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.9 + rev: v0.11.4 hooks: - id: ruff args: [--fix, --unsafe-fixes] @@ -24,7 +24,7 @@ repos: # commented out until PEP 639 is supported\ # https://github.com/abravalheri/validate-pyproject/issues/70 - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.23 + rev: v0.24.1 hooks: - id: validate-pyproject diff --git a/src/cmap/_catalog.py b/src/cmap/_catalog.py index d457a7684..c8768d1dd 100644 --- a/src/cmap/_catalog.py +++ b/src/cmap/_catalog.py @@ -246,7 +246,7 @@ def _sorter(x: Path) -> tuple[int, Path]: self._original_names[name] = normed_name self._data[normed_name] = data if alias := data.get("alias"): - self._aliases[normed_name] = cast(str, alias) + self._aliases[normed_name] = cast("str", alias) self._rev_aliases.setdefault(self._norm_name(alias), []).append( normed_name ) diff --git a/src/cmap/_colormap.py b/src/cmap/_colormap.py index ecfa920a3..7c30a1dc1 100644 --- a/src/cmap/_colormap.py +++ b/src/cmap/_colormap.py @@ -1182,7 +1182,7 @@ def __get_validators__(cls) -> Iterator[Callable]: yield cls.parse # pydantic validator def _json_encode(self) -> list: - return cast(list, self._stops.tolist()) + return cast("list", self._stops.tolist()) def _fill_stops( diff --git a/src/cmap/_util.py b/src/cmap/_util.py index 295efca6c..26b183ad0 100644 --- a/src/cmap/_util.py +++ b/src/cmap/_util.py @@ -426,7 +426,7 @@ def circlesineramp( im[rad < 0] = np.nan alpha[rad < 0] = 0 - return cast(np.ndarray, im * alpha) + return cast("np.ndarray", im * alpha) class ReportDict(TypedDict):