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

Function _get_cached

Lib/importlib/_bootstrap_external.py:369–378  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

367
368
369def _get_cached(filename):
370 if filename.endswith(tuple(SOURCE_SUFFIXES)):
371 try:
372 return cache_from_source(filename)
373 except NotImplementedError:
374 pass
375 elif filename.endswith(tuple(BYTECODE_SUFFIXES)):
376 return filename
377 else:
378 return None
379
380
381def _calc_mode(path):

Callers

nothing calls this directly

Calls 2

cache_from_sourceFunction · 0.70
endswithMethod · 0.45

Tested by

no test coverage detected