MCPcopy Index your code
hub / github.com/RustPython/RustPython / check_builtin

Function check_builtin

Lib/optparse.py:417–423  ·  view source on GitHub ↗
(option, opt, value)

Source from the content-addressed store, hash-verified

415 "complex" : (complex, _("complex")) }
416
417def check_builtin(option, opt, value):
418 (cvt, what) = _builtin_cvt[option.type]
419 try:
420 return cvt(value)
421 except ValueError:
422 raise OptionValueError(
423 _("option %s: invalid %s value: %r") % (opt, what, value))
424
425def check_choice(option, opt, value):
426 if value in option.choices:

Callers

nothing calls this directly

Calls 3

cvtFunction · 0.85
OptionValueErrorClass · 0.85
_Function · 0.50

Tested by

no test coverage detected