Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
interval: "quarterly"

groups:
actions:
patterns:
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/diffraxtra/_src/interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]:
Expand All @@ -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]
Expand Down
Loading