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

Function register

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

Source from the content-addressed store, hash-verified

8
9
10def register(kind, name):
11 kind_registry = _REGISTRY[kind]
12
13 def decorator(obj):
14 if name in kind_registry:
15 raise LookupError('{} already registered as kind {}'.format(name, kind))
16 kind_registry[name] = obj
17 return obj
18
19 return decorator
20
21
22def lookup(kind, name):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected