From a98ab43cc384fc69f100963cc189a2591cd8f52b Mon Sep 17 00:00:00 2001 From: Nathaniel Starkman Date: Sat, 1 Nov 2025 16:17:14 -0400 Subject: [PATCH 1/4] Change Dependabot schedule from monthly to quarterly Signed-off-by: Nathaniel Starkman --- .github/dependabot.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8b13673..8f3efd0 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: From b4c78cdcf570ef7e371b7d20a334a5211135d73e Mon Sep 17 00:00:00 2001 From: Nathaniel Starkman Date: Sat, 1 Nov 2025 20:24:13 +0000 Subject: [PATCH 2/4] fix: update ruff hook ID and bump check-jsonschema version --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f49df7e..62ec041 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.9.9" hooks: - - id: ruff + - id: ruff-check args: ["--fix", "--show-fixes"] - id: ruff-format @@ -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 From 5b2d492ea040e8b5c49ad067912e4a3ee82463d6 Mon Sep 17 00:00:00 2001 From: Nathaniel Starkman Date: Sat, 1 Nov 2025 20:27:39 +0000 Subject: [PATCH 3/4] fix: update ruff-pre-commit version to v0.14.3 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62ec041..6f68e11 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,7 +44,7 @@ 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-check args: ["--fix", "--show-fixes"] From 939195f128b35baa2c025021aa60a4c26c828c03 Mon Sep 17 00:00:00 2001 From: Nathaniel Starkman Date: Sat, 1 Nov 2025 20:45:42 +0000 Subject: [PATCH 4/4] fix: update pre-commit hooks and improve type casting in interp.py --- .github/dependabot.yml | 2 +- .pre-commit-config.yaml | 10 +++++----- src/diffraxtra/_src/interp.py | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8f3efd0..29afe45 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ updates: directory: "/" schedule: interval: "quarterly" - + groups: actions: patterns: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f68e11..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 @@ -51,7 +51,7 @@ repos: - 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 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]