MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / __call__

Method __call__

lightx2v/utils/profiler.py:202–218  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

200 def __call__(self, func):
201 if asyncio.iscoroutinefunction(func):
202
203 @wraps(func)
204 async def async_wrapper(*args, **kwargs):
205 async with self:
206 return await func(*args, **kwargs)
207
208 return async_wrapper
209 else:
210
211 @wraps(func)
212 def sync_wrapper(*args, **kwargs):
213 with self:
214 return func(*args, **kwargs)
215
216 return sync_wrapper
217
218
219class _NullContext:
220 # Context manager without decision branch logic overhead
221 def __init__(self, *args, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected