MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / wrapper

Function wrapper

openkb/cli.py:786–794  ·  view source on GitHub ↗
(ctx, *args, **kwargs)

Source from the content-addressed store, hash-verified

784 def decorator(fn):
785 @wraps(fn)
786 def wrapper(ctx, *args, **kwargs):
787 kb_dir = _find_kb_dir(ctx.obj.get("kb_dir_override"))
788 if kb_dir is None:
789 return fn(ctx, *args, **kwargs)
790 if exclusive:
791 with kb_ingest_lock(kb_dir / ".openkb"):
792 return fn(ctx, *args, **kwargs)
793 with kb_read_lock(kb_dir / ".openkb"):
794 return fn(ctx, *args, **kwargs)
795
796 return wrapper
797

Callers

nothing calls this directly

Calls 4

kb_ingest_lockFunction · 0.90
kb_read_lockFunction · 0.90
_find_kb_dirFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected