Skip to content

Commit 1a885cc

Browse files
Apply ruff/flake8-pyi rule PYI032
PYI032 Prefer `object` to `Any` for the second parameter to `__eq__`
1 parent 6b6cecd commit 1a885cc

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/zarr/core/buffer/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def ravel(self, order: Literal["K", "A", "C", "F"] = ...) -> Self: ...
9393

9494
def all(self) -> bool: ...
9595

96-
def __eq__(self, other: Any) -> Self: # type: ignore[explicit-override, override]
96+
def __eq__(self, other: object) -> Self: # type: ignore[explicit-override, override]
9797
"""Element-wise equal
9898
9999
Notes

src/zarr/store/common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@ def __str__(self) -> str:
6464
def __repr__(self) -> str:
6565
return f"StorePath({self.store.__class__.__name__}, {str(self)!r})"
6666

67-
def __eq__(self, other: Any) -> bool:
67+
def __eq__(self, other: object) -> bool:
6868
try:
69-
if self.store == other.store and self.path == other.path:
70-
return True
69+
return self.store == other.store and self.path == other.path # type: ignore[attr-defined, no-any-return]
7170
except Exception:
7271
pass
7372
return False

0 commit comments

Comments
 (0)