entity_instance: comparison operators to support non-entity types

This commit is contained in:
Andrej730
2026-07-22 12:22:45 +05:00
parent 6f643bad0c
commit e6a7f7513d
3 changed files with 74 additions and 56 deletions
@@ -208,6 +208,7 @@ class entity_instance_mixin:
return value
# TODO: dead code? Since overridden by `__eq__` defined on `entity_instance`.
def __eq__(self, other: entity_instance_mixin) -> bool:
if not isinstance(other, entity_instance_mixin):
if not self.is_entity():