Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#8014)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
pre-commit-ci[bot] authored Jul 24, 2023
1 parent 3fca020 commit ba26410
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
14 changes: 5 additions & 9 deletions xarray/tests/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,9 @@ def test_binary_op_bitshift(self) -> None:

def test_repr(self):
expected = dedent(
"""\
f"""\
<xarray.Variable (x: 4, y: 6)>
{!r}""".format(
self.lazy_var.data
)
{self.lazy_var.data!r}"""
)
assert expected == repr(self.lazy_var)

Expand Down Expand Up @@ -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"""\
<xarray.DataArray 'data' (x: 1)>
{!r}
{data!r}
Coordinates:
y (x) int64 dask.array<chunksize=(1,), meta=np.ndarray>
Dimensions without coordinates: x""".format(
data
)
Dimensions without coordinates: x"""
)
assert expected == repr(a)
assert kernel_call_count == 0 # should not evaluate dask array
Expand Down

0 comments on commit ba26410

Please sign in to comment.