change singleton to global

This commit is contained in:
Jonas Zeunert
2021-03-07 16:24:04 +01:00
parent 6450ee22dc
commit 62bdd68c5a
12 changed files with 25 additions and 28 deletions

View File

@@ -1,6 +0,0 @@
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
return cls._instances[cls]