MCPcopy Create free account
hub / github.com/C3ting/ARL / load_query_plugins

Function load_query_plugins

app/utils/query_loader.py:28–41  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

26
27
28def load_query_plugins(path):
29 from app import utils
30 logger = utils.get_logger()
31 plugins = []
32 for file_path, name in walk_py(path):
33 try:
34 module = import_source(spec="query_plugins", path=file_path)
35 plugin = getattr(module, 'Query')()
36 plugins.append(plugin)
37 except Exception as e:
38 logger.warning("load query plugin error from {}".format(file_path))
39 logger.exception(e)
40
41 return plugins
42

Callers

nothing calls this directly

Calls 2

walk_pyFunction · 0.85
import_sourceFunction · 0.85

Tested by

no test coverage detected