From 4773b0465857eddc9b814ff96c660acbd8b1901e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 15:01:52 +0000 Subject: [PATCH 1/3] Initial plan From 9504d714ce7381bf6803df38565f3d5092626800 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 15:04:16 +0000 Subject: [PATCH 2/3] Initial plan for fixing pre-commit issues Co-authored-by: dfm <350282+dfm@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bab640c5..12c42cd8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,16 +9,16 @@ repos: - id: end-of-file-fixer exclude_types: [json, binary] - repo: https://github.com/psf/black-pre-commit-mirror - rev: "25.11.0" + rev: "26.1.0" hooks: - id: black-jupyter - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.14.7" + rev: "v0.15.4" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/kynan/nbstripout - rev: "0.8.2" + rev: "0.9.1" hooks: - id: nbstripout exclude: docs/benchmarks.ipynb From 8b465d9f5c36b9aa724436b60cd24adc61498113 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 15:06:07 +0000 Subject: [PATCH 3/3] Fix pre-commit issues: update hook versions, ignore UP047, inline lambda Co-authored-by: dfm <350282+dfm@users.noreply.github.com> --- pyproject.toml | 1 + tests/test_gp.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 276767e9..d55864ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ ignore = [ "PLR0915", # Allow many statements "PLR2004", # Allow magic numbers in comparisons "B905", # Allow zip() without explicit `strict=` parameter + "UP047", # PEP 695 type params require Python 3.12+; project supports 3.11+ ] exclude = [] diff --git a/tests/test_gp.py b/tests/test_gp.py index add8ad91..9268b6ad 100644 --- a/tests/test_gp.py +++ b/tests/test_gp.py @@ -25,9 +25,7 @@ def test_sample(data): X, _ = data with jax.enable_x64(True): - gp = GaussianProcess( - kernels.Matern32(1.5), X, diag=0.01, mean=lambda x: jnp.sum(x) - ) + gp = GaussianProcess(kernels.Matern32(1.5), X, diag=0.01, mean=jnp.sum) y = gp.sample(jax.random.PRNGKey(543)) assert y.shape == (len(X),)