Skip to content

Commit 438f379

Browse files
Apply ruff/Pylint rule PLR5501
PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
1 parent 8c4bc6e commit 438f379

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/zarr/core/codec_pipeline.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,13 +529,12 @@ async def _read_key(
529529
):
530530
if chunk_array is None:
531531
chunk_array_batch.append(None) # type: ignore[unreachable]
532+
elif not chunk_spec.config.write_empty_chunks and chunk_array.all_equal(
533+
fill_value_or_default(chunk_spec)
534+
):
535+
chunk_array_batch.append(None)
532536
else:
533-
if not chunk_spec.config.write_empty_chunks and chunk_array.all_equal(
534-
fill_value_or_default(chunk_spec)
535-
):
536-
chunk_array_batch.append(None)
537-
else:
538-
chunk_array_batch.append(chunk_array)
537+
chunk_array_batch.append(chunk_array)
539538

540539
chunk_bytes_batch = await self.encode_batch(
541540
[

0 commit comments

Comments
 (0)