MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / lookup

Function lookup

rat-sql-gap/seq2struct/utils/registry.py:22–28  ·  view source on GitHub ↗
(kind, name)

Source from the content-addressed store, hash-verified

20
21
22def lookup(kind, name):
23 if isinstance(name, collections.abc.Mapping):
24 name = name['name']
25
26 if kind not in _REGISTRY:
27 raise KeyError('Nothing registered under "{}"'.format(kind))
28 return _REGISTRY[kind][name]
29
30
31def construct(kind, config, unused_keys=(), **kwargs):

Callers 1

constructFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected