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

Function _get_pyc_source

Lib/zipimport.py:775–785  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

773# contents of the matching .py file, or None if no source
774# is available.
775def _get_pyc_source(self, path):
776 # strip 'c' or 'o' from *.py[co]
777 assert path[-1:] in ('c', 'o')
778 path = path[:-1]
779
780 try:
781 toc_entry = self._get_files()[path]
782 except KeyError:
783 return None
784 else:
785 return _get_data(self.archive, toc_entry)
786
787
788# Get the code object associated with the module specified by

Callers 1

_unmarshal_codeFunction · 0.85

Calls 2

_get_dataFunction · 0.85
_get_filesMethod · 0.80

Tested by

no test coverage detected