MCPcopy Create free account
hub / github.com/MinishLab/vicinity / _require

Function _require

vicinity/backends/__init__.py:16–19  ·  view source on GitHub ↗

Check if a dependency is importable, otherwise raise an error.

(module_name: str, backend: Backend, extra: str)

Source from the content-addressed store, hash-verified

14
15
16def _require(module_name: str, backend: Backend, extra: str) -> None:
17 """Check if a dependency is importable, otherwise raise an error."""
18 if find_spec(module_name) is None:
19 raise OptionalDependencyError(backend, extra)
20
21
22def get_backend_class(backend: Backend | str) -> type[AbstractBackend]:

Callers 1

get_backend_classFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…