MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / wrapper

Function wrapper

camel/utils/commons.py:205–213  ·  view source on GitHub ↗
(*args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

203 def decorator(func: F) -> F:
204 @wraps(func)
205 def wrapper(*args: Any, **kwargs: Any) -> Any:
206 missing_modules = [
207 m for m in required_modules if not is_module_available(m)
208 ]
209 if missing_modules:
210 raise ImportError(
211 f"Missing required modules: {', '.join(missing_modules)}"
212 )
213 return func(*args, **kwargs)
214
215 return cast(F, wrapper)
216

Callers

nothing calls this directly

Calls 1

is_module_availableFunction · 0.70

Tested by

no test coverage detected