Skip to content

Commit 292092d

Browse files
committed
fix: Mypy
1 parent f89d488 commit 292092d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hypothesis_jsonschema/_canonicalise.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def __init__(self, schema: Schema) -> None:
8282
self.schema = schema
8383
self.encoded = hash(json.dumps(schema, sort_keys=True))
8484

85-
def __eq__(self, other: "CacheableSchema") -> bool:
85+
def __eq__(self, other: object) -> bool:
86+
if not isinstance(other, CacheableSchema):
87+
return NotImplemented
8688
return self.encoded == other.encoded
8789

8890
def __hash__(self) -> int:

0 commit comments

Comments
 (0)