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

Function check

prometheus_client/decorator.py:332–336  ·  view source on GitHub ↗

Make sure one passes the expected number of arguments

(arguments, wrong=operator.ne, msg='')

Source from the content-addressed store, hash-verified

330 dispatch_str = '(%s,)' % ', '.join(dispatch_args)
331
332 def check(arguments, wrong=operator.ne, msg=''):
333 """Make sure one passes the expected number of arguments"""
334 if wrong(len(arguments), len(dispatch_args)):
335 raise TypeError('Expected %d arguments, got %d%s' %
336 (len(dispatch_args), len(arguments), msg))
337
338 def gen_func_dec(func):
339 """Decorator turning a function into a generic function"""

Callers 5

vancestorsFunction · 0.85
ancestorsFunction · 0.85
registerFunction · 0.85
decFunction · 0.85
dispatch_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected