diff --git a/elastic_transport/_node/_base.py b/elastic_transport/_node/_base.py index e912e7a..b4e19a1 100644 --- a/elastic_transport/_node/_base.py +++ b/elastic_transport/_node/_base.py @@ -143,6 +143,11 @@ def path_prefix(self) -> str: def __repr__(self) -> str: return f"<{self.__class__.__name__}({self.base_url})>" + def __lt__(self, other: object) -> bool: + if not isinstance(other, BaseNode): + return NotImplemented + return id(self) < id(other) + def __eq__(self, other: object) -> bool: if not isinstance(other, BaseNode): return NotImplemented