Add __hash__ method for permissions.OperandHolder class (#9417)

`OperandHolder` is not hashable, so need to add `__hash__` method
This commit is contained in:
Ivan Studinsky 2024-06-10 13:19:06 +07:00 committed by GitHub
parent fbdab09c77
commit fe92f0dd0d
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 self.op2_class == other.op2_class
) )
def __hash__(self):
return hash((self.operator_class, self.op1_class, self.op2_class))
class AND: class AND:
def __init__(self, op1, op2): def __init__(self, op1, op2):