From 51ca5402734f6e62dc2fd621398351f673a7e82b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:44:16 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.9...v0.8.6) - [github.com/executablebooks/mdformat: 0.7.17 → 0.7.21](https://github.com/executablebooks/mdformat/compare/0.7.17...0.7.21) - [github.com/kynan/nbstripout: 0.7.1 → 0.8.1](https://github.com/kynan/nbstripout/compare/0.7.1...0.8.1) - [github.com/abravalheri/validate-pyproject: v0.20.2 → v0.23](https://github.com/abravalheri/validate-pyproject/compare/v0.20.2...v0.23) - [github.com/rhysd/actionlint: v1.7.3 → v1.7.6](https://github.com/rhysd/actionlint/compare/v1.7.3...v1.7.6) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09189aaf..43a3e0c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: "v0.6.9" + rev: "v0.8.6" hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -24,7 +24,7 @@ repos: - id: check-docstring-first - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.21 hooks: - id: mdformat additional_dependencies: @@ -32,7 +32,7 @@ repos: - mdformat-myst - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 + rev: 0.8.1 hooks: - id: nbstripout args: [--extra-keys=metadata.kernelspec metadata.language_info.version] @@ -45,12 +45,12 @@ repos: - tomli - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.20.2 + rev: v0.23 hooks: - id: validate-pyproject - repo: https://github.com/rhysd/actionlint - rev: v1.7.3 + rev: v1.7.6 hooks: - id: actionlint files: ".github/workflows/" From f6fdc5708c22feb533fc717fcab09be491d07da1 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Sun, 12 Jan 2025 19:18:23 -0600 Subject: [PATCH 2/2] fix --- .pre-commit-config.yaml | 2 +- flox/core.py | 3 +-- tests/__init__.py | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 43a3e0c0..a36b602f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: "v0.8.6" + rev: "v0.9.1" hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/flox/core.py b/flox/core.py index 91903ded..81d9954c 100644 --- a/flox/core.py +++ b/flox/core.py @@ -2364,8 +2364,7 @@ def groupby_reduce( if engine == "flox" and _is_arg_reduction(func): raise NotImplementedError( - "argreductions not supported for engine='flox' yet." - "Try engine='numpy' or engine='numba' instead." + "argreductions not supported for engine='flox' yet. Try engine='numpy' or engine='numba' instead." ) if engine == "numbagg" and dtype is not None: diff --git a/tests/__init__.py b/tests/__init__.py index deaf7c0a..84cca72e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -66,9 +66,7 @@ def __init__(self, max_computes=0): def __call__(self, dsk, keys, **kwargs): self.total_computes += 1 if self.total_computes > self.max_computes: - raise RuntimeError( - "Too many computes. Total: %d > max: %d." % (self.total_computes, self.max_computes) - ) + raise RuntimeError(f"Too many computes. Total: {self.total_computes} > max: {self.max_computes}.") return dask.get(dsk, keys, **kwargs)