You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a SingletonObject by creating a private metaclass that inherits from Singleton and _ObjectMeta and a metaclass for a StrictSingletonObject that inherits from Singleton and _StrictObjectMeta.
The proposed use case would be a global settings object:
from typet import SingletonObject, File
class _Configuration(SingletonObject):
config: File = '~/.my_config'
settings = _Configuration()
The text was updated successfully, but these errors were encountered:
Create a
SingletonObject
by creating a private metaclass that inherits fromSingleton
and_ObjectMeta
and a metaclass for aStrictSingletonObject
that inherits fromSingleton
and_StrictObjectMeta
.The proposed use case would be a global settings object:
The text was updated successfully, but these errors were encountered: