Allow the Version class to be dictionary keys

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-02-24 21:16:56 +00:00 committed by Pedro Algarvio
parent a928c91f30
commit a020f3993d

View file

@ -114,3 +114,6 @@ class Version(packaging.version.Version):
if not isinstance(other, self.__class__):
other = self.__class__(other)
return super().__ne__(other)
def __hash__(self):
return hash(str(self))