MCPcopy Create free account
hub / github.com/catboost/catboost / get_source

Method get_source

library/python/runtime_py3/__res.py:433–444  ·  view source on GitHub ↗
(self, fullname)

Source from the content-addressed store, hash-verified

431 # Used by `linecache` (while printing tracebacks) unless module filename
432 # exists on the filesystem.
433 def get_source(self, fullname):
434 fullname = self._source_name.get(fullname) or fullname
435 if self.is_package(fullname):
436 fullname += '.__init__'
437
438 relpath = self.get_filename(fullname)
439 if relpath:
440 abspath = resfs_resolve(relpath)
441 if abspath:
442 return _s(file_bytes(abspath))
443 data = resfs_read(mod_path(fullname))
444 return _s(data) if data else ''
445
446 def get_code(self, fullname):
447 modname = fullname

Callers 2

find_specMethod · 0.95
check_importsFunction · 0.45

Calls 7

is_packageMethod · 0.95
get_filenameMethod · 0.95
resfs_resolveFunction · 0.85
file_bytesFunction · 0.85
resfs_readFunction · 0.85
mod_pathFunction · 0.85
getMethod · 0.45

Tested by 1

check_importsFunction · 0.36