Skip to content

Commit 16c2684

Browse files
Unnecessary list literal → set literal (#1534)
* Unnecessary list literal → set literal Why use a list literal to initialise a set? Just use a set literal. * Add release note for previous commit Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> --------- Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
1 parent a9d516b commit 16c2684

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/release.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Unreleased
2121
Maintenance
2222
~~~~~~~~~~~
2323

24+
* Initialise some sets in tests with set literals instead of list literals.
25+
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`1534`.
26+
2427
* Allow ``black`` code formatter to be run with any Python version.
2528
By :user:`David Stansby <dstansby>` :issue:`1549`
2629

zarr/tests/test_storage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,9 @@ def test_deep_ndim(self):
11661166
if self.version == 2:
11671167
assert set(store.listdir()) == {".zgroup", "bar"}
11681168
else:
1169-
assert set(store.listdir()) == set(["data", "meta", "zarr.json"])
1170-
assert set(store.listdir("meta/root/" + path)) == set(["bar", "bar.group.json"])
1171-
assert set(store.listdir("data/root/" + path)) == set(["bar"])
1169+
assert set(store.listdir()) == {"data", "meta", "zarr.json"}
1170+
assert set(store.listdir("meta/root/" + path)) == {"bar", "bar.group.json"}
1171+
assert set(store.listdir("data/root/" + path)) == {"bar"}
11721172
assert foo["bar"]["baz"][(0, 0, 0)] == 1
11731173

11741174
def test_not_fsspec(self):

0 commit comments

Comments
 (0)