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

Method from_parsed

Tools/c-analyzer/c_parser/info.py:432–444  ·  view source on GitHub ↗
(cls, parsed)

Source from the content-addressed store, hash-verified

430
431 @classmethod
432 def from_parsed(cls, parsed):
433 if parsed.kind is not cls.kind:
434 raise TypeError(f'kind mismatch ({parsed.kind.value} != {cls.kind.value})')
435 data, extra = cls._resolve_data(parsed.data)
436 self = cls(
437 cls._resolve_file(parsed),
438 parsed.name,
439 data,
440 cls._resolve_parent(parsed) if parsed.parent else None,
441 **extra or {}
442 )
443 self._parsed = parsed
444 return self
445
446 @classmethod
447 def _resolve_file(cls, parsed):

Callers

nothing calls this directly

Calls 4

_resolve_fileMethod · 0.80
clsClass · 0.50
_resolve_dataMethod · 0.45
_resolve_parentMethod · 0.45

Tested by

no test coverage detected