diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8b13673..29afe45 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,8 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "monthly" + interval: "quarterly" + groups: actions: patterns: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f49df7e..387f594 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v4.4.1 + rev: v4.9.1 hooks: - id: commitizen additional_dependencies: [cz-conventional-gitmoji] @@ -15,14 +15,14 @@ repos: - id: check-useless-excludes - repo: https://github.com/adamchainz/blacken-docs - rev: "1.19.1" + rev: "1.20.0" hooks: - id: blacken-docs additional_dependencies: [black==24.*] exclude: README.md - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v5.0.0" + rev: "v6.0.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -44,14 +44,14 @@ repos: args: [--prose-wrap=always] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.9.9" + rev: "v0.14.3" hooks: - - id: ruff + - id: ruff-check args: ["--fix", "--show-fixes"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.15.0" + rev: "v1.18.2" hooks: - id: mypy files: src @@ -70,7 +70,7 @@ repos: args: [--skip=uv.lock] - repo: https://github.com/shellcheck-py/shellcheck-py - rev: "v0.10.0.1" + rev: "v0.11.0.1" hooks: - id: shellcheck @@ -89,7 +89,7 @@ repos: # additional_dependencies: ["validate-pyproject-schema-store[all]"] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: "0.31.2" + rev: "0.34.1" hooks: - id: check-dependabot - id: check-github-workflows diff --git a/src/diffraxtra/_src/interp.py b/src/diffraxtra/_src/interp.py index 31bcebf..5bc0ff1 100644 --- a/src/diffraxtra/_src/interp.py +++ b/src/diffraxtra/_src/interp.py @@ -112,14 +112,14 @@ def evaluate( def t0(self) -> BatchedRealScalar: # type: ignore[override] """The start time of the interpolation.""" flatt0 = jax.vmap(lambda x: x.t0)(self.scalar_interpolation) - return cast(BatchedRealScalar, flatt0.reshape(*self.batch_shape)) + return cast("BatchedRealScalar", flatt0.reshape(*self.batch_shape)) @override @property def t1(self) -> BatchedRealScalar: # type: ignore[override] """The end time of the interpolation.""" flatt1 = jax.vmap(lambda x: x.t1)(self.scalar_interpolation) - return cast(BatchedRealScalar, flatt1.reshape(*self.batch_shape)) + return cast("BatchedRealScalar", flatt1.reshape(*self.batch_shape)) @property def ts(self) -> BatchedRealTimes: @@ -129,12 +129,12 @@ def ts(self) -> BatchedRealTimes: @property def ts_size(self) -> Int[Array, "..."]: # TODO: shape """The number of times in the interpolation.""" - return cast(Array, self.scalar_interpolation.ts_size) + return cast("Array", self.scalar_interpolation.ts_size) @property def infos(self) -> VecDenseInfos: """The infos of the interpolation.""" - return cast(VecDenseInfos, self.scalar_interpolation.infos) + return self.scalar_interpolation.infos @property def interpolation_cls(self) -> Callable[..., dfx.AbstractLocalInterpolation]: @@ -144,12 +144,12 @@ def interpolation_cls(self) -> Callable[..., dfx.AbstractLocalInterpolation]: @property def direction(self) -> BatchedIntScalar: """Direction vector.""" - return cast(BatchedIntScalar, self.scalar_interpolation.direction) + return cast("BatchedIntScalar", self.scalar_interpolation.direction) @property def t0_if_trivial(self) -> BatchedRealScalar: """The start time of the interpolation if scalar input.""" - return cast(BatchedRealScalar, self.scalar_interpolation.t0_if_trivial) + return cast("BatchedRealScalar", self.scalar_interpolation.t0_if_trivial) @property # TODO: get the shape correct def y0_if_trivial(self) -> PyTree[RealScalarLike, "Y"]: # type: ignore[name-defined]