MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / load

Method load

lib/sqlalchemy/util/langhelpers.py:371–388  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

369 self.impls.clear()
370
371 def load(self, name: str) -> Any:
372 if name in self.impls:
373 return self.impls[name]()
374
375 if self.auto_fn:
376 loader = self.auto_fn(name)
377 if loader:
378 self.impls[name] = loader
379 return loader()
380
381 for impl in compat.importlib_metadata_get(self.group):
382 if impl.name == name:
383 self.impls[name] = impl.load
384 return impl.load()
385
386 raise exc.NoSuchModuleError(
387 "Can't load plugin: %s:%s" % (self.group, name)
388 )
389
390 def register(self, name: str, modulepath: str, objname: str) -> None:
391 def load():

Callers

nothing calls this directly

Calls 2

loaderFunction · 0.85
splitMethod · 0.80

Tested by

no test coverage detected