Skip to content

Commit

Permalink
Couple fixes (#1737)
Browse files Browse the repository at this point in the history
* Use `is` when comparing `type` of two objects

* Unnecessary `None` provided as default
  • Loading branch information
DimitriPapadopoulos committed Apr 2, 2024
1 parent 9864b40 commit aa9a0d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zarr/_storage/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def inner_store(self) -> Union["StorageTransformer", StoreV3]:

def __eq__(self, other):
return (
type(self) == type(other)
type(self) is type(other)
and self._inner_store == other._inner_store
and self.get_config() == other.get_config()
)
Expand Down
2 changes: 1 addition & 1 deletion zarr/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def create_array(self, shape: Union[int, Tuple[int, ...]], **kwargs):
"compressor": kwargs.pop("compressor", self.compressor),
"chunk_store": chunk_store,
"storage_transformers": self.create_storage_transformers(shape),
"filters": kwargs.pop("filters", self.create_filters(kwargs.get("dtype", None))),
"filters": kwargs.pop("filters", self.create_filters(kwargs.get("dtype"))),
}

# keyword arguments for array instantiation
Expand Down

0 comments on commit aa9a0d5

Please sign in to comment.