Add __hash__ method for permissions.OperandHolder class

`OperandHolder` is not hashable, so need to add `__hash__` method
This commit is contained in:
Ivan Studinsky 2024-05-30 10:58:57 +07:00 committed by GitHub
parent 36d5c0e74f
commit 630c0f740d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,9 @@ class OperandHolder(OperationHolderMixin):
self.op2_class == other.op2_class
)
def __hash__(self):
return hash((self.operator_class, self.op1_class, self.op2_class))
class AND:
def __init__(self, op1, op2):