MCPcopy Create free account
hub / github.com/CL-lau/SQL-GPT / Singleton

Class Singleton

embedding/embeddingHelper.py:51–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51class Singleton(type):
52 _instances = {}
53
54 def __call__(cls, *args, **kwargs):
55 if cls not in cls._instances:
56 cls._instances[cls] = super().__call__(*args, **kwargs)
57 return cls._instances[cls]
58
59
60@singleton

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected