From ba26410f7cab2ab4478f42fe8f17ec88bdcb04ee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 22:40:36 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#8014) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.278 → v0.0.280](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.278...v0.0.280) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- xarray/tests/test_dask.py | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eca14fe0631..2c89193b1cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: files: ^xarray/ - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.0.278' + rev: 'v0.0.280' hooks: - id: ruff args: ["--fix"] diff --git a/xarray/tests/test_dask.py b/xarray/tests/test_dask.py index ed18718043b..6e65d52fdb5 100644 --- a/xarray/tests/test_dask.py +++ b/xarray/tests/test_dask.py @@ -193,11 +193,9 @@ def test_binary_op_bitshift(self) -> None: def test_repr(self): expected = dedent( - """\ + f"""\ - {!r}""".format( - self.lazy_var.data - ) + {self.lazy_var.data!r}""" ) assert expected == repr(self.lazy_var) @@ -656,14 +654,12 @@ def test_dataarray_repr(self): nonindex_coord = build_dask_array("coord") a = DataArray(data, dims=["x"], coords={"y": ("x", nonindex_coord)}) expected = dedent( - """\ + f"""\ - {!r} + {data!r} Coordinates: y (x) int64 dask.array - Dimensions without coordinates: x""".format( - data - ) + Dimensions without coordinates: x""" ) assert expected == repr(a) assert kernel_call_count == 0 # should not evaluate dask array