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

Method __init__

Lib/importlib/_bootstrap_external.py:1331–1346  ·  view source on GitHub ↗

Initialize with the path to search on and a variable number of 2-tuples containing the loader and the file suffixes the loader recognizes.

(self, path, *loader_details)

Source from the content-addressed store, hash-verified

1329 """
1330
1331 def __init__(self, path, *loader_details):
1332 """Initialize with the path to search on and a variable number of
1333 2-tuples containing the loader and the file suffixes the loader
1334 recognizes."""
1335 loaders = []
1336 for loader, suffixes in loader_details:
1337 loaders.extend((suffix, loader) for suffix in suffixes)
1338 self._loaders = loaders
1339 # Base (directory) path
1340 if not path or path == '.':
1341 self.path = _os.getcwd()
1342 else:
1343 self.path = _path_abspath(path)
1344 self._path_mtime = -1
1345 self._path_cache = set()
1346 self._relaxed_path_cache = set()
1347
1348 def invalidate_caches(self):
1349 """Invalidate the directory mtime."""

Callers

nothing calls this directly

Calls 3

setFunction · 0.85
_path_abspathFunction · 0.70
extendMethod · 0.45

Tested by

no test coverage detected