MCPcopy Create free account
hub / github.com/microsoft/debugpy / _converter

Function _converter

src/debugpy/common/json.py:96–103  ·  view source on GitHub ↗

Convert value (str) to number, otherwise return None if is not possible

(value, classinfo)

Source from the content-addressed store, hash-verified

94
95
96def _converter(value, classinfo):
97 """Convert value (str) to number, otherwise return None if is not possible"""
98 for one_info in classinfo:
99 if issubclass(one_info, numbers.Number):
100 try:
101 return one_info(value)
102 except ValueError:
103 pass
104
105
106def of_type(*classinfo, **kwargs):

Callers 1

validateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…