Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,16 @@ extend-select = [
"PGH", # pygrep-hooks
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RET", # flake8-return
"RUF",
"TCH", # flake8-type-checking
"TRY", # tryceratops
"UP", # pyupgrade
]
ignore = [
"PYI013",
"RET505",
"RET506",
"RUF005",
"TRY003",
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/abc/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ async def _set_many(self, values: Iterable[tuple[str, Buffer]]) -> None:
Insert multiple (key, value) pairs into storage.
"""
await gather(*(self.set(key, value) for key, value in values))
return None
return

@property
@abstractmethod
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/core/buffer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,9 @@ def all_equal(self, other: Any, equal_nan: bool = True) -> bool:
return False
# use array_equal to obtain equal_nan=True functionality
data, other = np.broadcast_arrays(self._data, other)
result = np.array_equal(
return np.array_equal(
self._data, other, equal_nan=equal_nan if self._data.dtype.kind not in "US" else False
)
return result

def fill(self, value: Any) -> None:
self._data.fill(value)
Expand Down
6 changes: 2 additions & 4 deletions tests/v3/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ def path_type(request: pytest.FixtureRequest) -> Any:
@pytest.fixture
async def store_path(tmpdir: LEGACY_PATH) -> StorePath:
store = await LocalStore.open(str(tmpdir), mode="w")
p = StorePath(store)
return p
return StorePath(store)


@pytest.fixture(scope="function")
Expand Down Expand Up @@ -88,13 +87,12 @@ async def async_group(request: pytest.FixtureRequest, tmpdir: LEGACY_PATH) -> As
param: AsyncGroupRequest = request.param

store = await parse_store(param.store, str(tmpdir))
agroup = await AsyncGroup.from_store(
return await AsyncGroup.from_store(
store,
attributes=param.attributes,
zarr_format=param.zarr_format,
exists_ok=False,
)
return agroup


@pytest.fixture(params=["numpy", "cupy"])
Expand Down
8 changes: 2 additions & 6 deletions tests/v3/test_store/test_stateful_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,12 @@ def list(self) -> list:
return self._sync_iter(self.store.list())

def get(self, key: str, prototype: BufferPrototype) -> zarr.core.buffer.Buffer:
obs = self._sync(self.store.get(key, prototype=prototype))
return obs
return self._sync(self.store.get(key, prototype=prototype))

def get_partial_values(
self, key_ranges: list, prototype: BufferPrototype
) -> zarr.core.buffer.Buffer:
obs_partial = self._sync(
self.store.get_partial_values(prototype=prototype, key_ranges=key_ranges)
)
return obs_partial
return self._sync(self.store.get_partial_values(prototype=prototype, key_ranges=key_ranges))

def delete(self, path: str) -> None:
return self._sync(self.store.delete(path))
Expand Down