mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
entity_instance: comparison operators to support non-entity types
This commit is contained in:
@@ -93,11 +93,6 @@ except Exception:
|
||||
from . import guid
|
||||
from .ifcopenshell_wrapper import entity_instance, file
|
||||
from .file import rocksdb_lazy_instance
|
||||
# Hacks!
|
||||
from .entity_instance import _patch_swig_comparisons
|
||||
_patch_swig_comparisons()
|
||||
del _patch_swig_comparisons
|
||||
# End hacks!
|
||||
from .sql import sqlite, sqlite_entity
|
||||
|
||||
get_log = ifcopenshell_wrapper.get_log
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user