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