diff --git a/uri/scheme.py b/uri/scheme.py index 0d225cf..dec1c47 100644 --- a/uri/scheme.py +++ b/uri/scheme.py @@ -16,6 +16,8 @@ def __eq__(self, other: "SchemeLike"): if isinstance(other, self.__class__): return self is other + raise RuntimeError(f"Cannot compare objects - incompatible types, " f"self: {type(self)}, other: {type(other)}") + def __hash__(self) -> int: return hash(self.name)