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

Function decorator

camel/utils/commons.py:203–215  ·  view source on GitHub ↗
(func: F)

Source from the content-addressed store, hash-verified

201 """
202
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
217 return decorator
218

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected