MCPcopy Create free account
hub / github.com/browser-use/macOS-use / singleton

Function singleton

mlx_use/utils.py:46–54  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

44
45
46def singleton(cls):
47 instance = [None]
48
49 def wrapper(*args, **kwargs):
50 if instance[0] is None:
51 instance[0] = cls(*args, **kwargs)
52 return instance[0]
53
54 return wrapper

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected