From 730a48bbb4479304f741daf30f9fb75374eeab48 Mon Sep 17 00:00:00 2001 From: 2-REC Date: Wed, 9 Feb 2022 12:21:31 +0700 Subject: [PATCH] Hash for AbstractEntity --- pyblish/plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyblish/plugin.py b/pyblish/plugin.py index ef16dfc..79f4446 100644 --- a/pyblish/plugin.py +++ b/pyblish/plugin.py @@ -713,6 +713,12 @@ def __init__(self, name, parent=None): if parent is not None: parent.append(self) + def __hash__(self): + return self.id + + def __eq__(self, other): + return self.id == other.id + @property def id(self): return self._id