MCPcopy Index your code
hub / github.com/prometheus/client_python / __call__

Method __call__

prometheus_client/decorator.py:277–281  ·  view source on GitHub ↗

Context manager decorator

(self, func)

Source from the content-addressed store, hash-verified

275
276class ContextManager(_GeneratorContextManager):
277 def __call__(self, func):
278 """Context manager decorator"""
279 return FunctionMaker.create(
280 func, "with _self_: return _func_(%(shortsignature)s)",
281 dict(_self_=self, _func_=func), __wrapped__=func)
282
283
284init = getfullargspec(_GeneratorContextManager.__init__)

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected