Skip to content

Commit 8d050e5

Browse files
Apply ruff/Pylint rule PLC0206
Extracting value from dictionary without calling `.items()`
1 parent 69f4d5d commit 8d050e5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/ndarray/test_copy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ def test_values(shape, chunks1, blocks1, chunks2, blocks2, dtype):
5555
b = a.copy(chunks=chunks2, blocks=blocks2, cparams=cparams2)
5656
assert a.shape == b.shape
5757
assert a.schunk.dparams == b.schunk.dparams
58-
for key in cparams2:
58+
for key, value in cparams2.items():
5959
if key in ("filters", "filters_meta"):
60-
assert getattr(b.schunk.cparams, key)[: len(cparams2[key])] == cparams2[key]
60+
assert getattr(b.schunk.cparams, key)[: len(value)] == value
6161
continue
62-
assert getattr(b.schunk.cparams, key) == cparams2[key]
62+
assert getattr(b.schunk.cparams, key) == value
6363
assert b.chunks == tuple(chunks2)
6464
assert b.blocks == tuple(blocks2)
6565
assert a.dtype == b.dtype

0 commit comments

Comments
 (0)