Skip to content

Commit ba26410

Browse files
[pre-commit.ci] pre-commit autoupdate (#8014)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.278 → v0.0.280](astral-sh/ruff-pre-commit@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>
1 parent 3fca020 commit ba26410

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
files: ^xarray/
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
1818
# Ruff version.
19-
rev: 'v0.0.278'
19+
rev: 'v0.0.280'
2020
hooks:
2121
- id: ruff
2222
args: ["--fix"]

xarray/tests/test_dask.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,9 @@ def test_binary_op_bitshift(self) -> None:
193193

194194
def test_repr(self):
195195
expected = dedent(
196-
"""\
196+
f"""\
197197
<xarray.Variable (x: 4, y: 6)>
198-
{!r}""".format(
199-
self.lazy_var.data
200-
)
198+
{self.lazy_var.data!r}"""
201199
)
202200
assert expected == repr(self.lazy_var)
203201

@@ -656,14 +654,12 @@ def test_dataarray_repr(self):
656654
nonindex_coord = build_dask_array("coord")
657655
a = DataArray(data, dims=["x"], coords={"y": ("x", nonindex_coord)})
658656
expected = dedent(
659-
"""\
657+
f"""\
660658
<xarray.DataArray 'data' (x: 1)>
661-
{!r}
659+
{data!r}
662660
Coordinates:
663661
y (x) int64 dask.array<chunksize=(1,), meta=np.ndarray>
664-
Dimensions without coordinates: x""".format(
665-
data
666-
)
662+
Dimensions without coordinates: x"""
667663
)
668664
assert expected == repr(a)
669665
assert kernel_call_count == 0 # should not evaluate dask array

0 commit comments

Comments
 (0)