MCPcopy Index your code
hub / github.com/bpython/bpython / find_all_modules

Method find_all_modules

bpython/importcompletion.py:241–251  ·  view source on GitHub ↗

Return a list with all modules in `path`, which should be a list of directory names. If path is not given, sys.path will be used.

(
        self, paths: Iterable[Path]
    )

Source from the content-addressed store, hash-verified

239 yield None # take a break to avoid unresponsiveness
240
241 def find_all_modules(
242 self, paths: Iterable[Path]
243 ) -> Generator[None, None, None]:
244 """Return a list with all modules in `path`, which should be a list of
245 directory names. If path is not given, sys.path will be used."""
246
247 for p in paths:
248 for module in self.find_modules(p):
249 if module is not None:
250 self.modules.add(module)
251 yield
252
253 def find_coroutine(self) -> bool:
254 if self.fully_loaded:

Callers 1

__init__Method · 0.95

Calls 2

find_modulesMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected