MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / __call__

Method __call__

lib/sqlalchemy/util/_collections.py:664–669  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

662 self.registry = threading.local()
663
664 def __call__(self) -> _T:
665 try:
666 return self.registry.value # type: ignore[no-any-return]
667 except AttributeError:
668 val = self.registry.value = self.createfunc()
669 return val
670
671 def has(self) -> bool:
672 return hasattr(self.registry, "value")

Callers

nothing calls this directly

Calls 1

createfuncMethod · 0.80

Tested by

no test coverage detected