MCPcopy Index your code
hub / github.com/python/cpython / from_raw

Method from_raw

Tools/c-analyzer/c_common/tables.py:276–288  ·  view source on GitHub ↗
(cls, raw)

Source from the content-addressed store, hash-verified

274
275 @classmethod
276 def from_raw(cls, raw):
277 if not raw:
278 raise ValueError('missing column spec')
279 elif isinstance(raw, cls):
280 return raw
281
282 if isinstance(raw, str):
283 *values, _ = cls._parse(raw)
284 else:
285 *values, _ = cls._normalize(raw)
286 if values is None:
287 raise ValueError(f'unsupported column spec {raw!r}')
288 return cls(*values)
289
290 @classmethod
291 def parse(cls, specstr):

Callers 1

resolve_columnsFunction · 0.45

Calls 3

clsClass · 0.50
_parseMethod · 0.45
_normalizeMethod · 0.45

Tested by

no test coverage detected