Code Widget refactor; observable refactor

This commit is contained in:
2025-12-28 19:53:05 -06:00
parent 12ada8568e
commit e18be655e8
37 changed files with 853 additions and 173 deletions

View File

@@ -15,8 +15,15 @@ class Singleton:
_instance = None
def __new__(cls, *args, **kwargs):
if cls._instance:
raise SingletonError(f"'{cls.__name__}' is a Singleton. Cannot create a new instance...")
if cls._instance is not None:
logger.debug(f"'{cls.__name__}' is a Singleton. Returning instance...")
return cls._instance
cls._instance = super(Singleton, cls).__new__(cls)
return cls._instance
def __init__(self):
if self._instance is not None:
return
super(Singleton, self).__init__()