MCPcopy Create free account
hub / github.com/python/cpython / from_raw

Method from_raw

Tools/c-analyzer/c_analyzer/info.py:38–49  ·  view source on GitHub ↗
(cls, raw, **extra)

Source from the content-addressed store, hash-verified

36
37 @classonly
38 def from_raw(cls, raw, **extra):
39 if isinstance(raw, cls):
40 if extra:
41 # XXX ?
42 raise NotImplementedError((raw, extra))
43 #return cls(raw.item, raw.typedecl, **raw._extra, **extra)
44 else:
45 return info
46 elif cls.is_target(raw):
47 return cls(raw, **extra)
48 else:
49 raise NotImplementedError((raw, extra))
50
51 @classonly
52 def from_resolved(cls, item, resolved, **extra):

Callers 1

build_itemMethod · 0.45

Calls 2

clsClass · 0.50
is_targetMethod · 0.45

Tested by

no test coverage detected