class documentation

class ImportlibFinder(Finder): (source)

Known subclasses: astroid.interpreter._import.spec.ExplicitNamespacePackageFinder

View In Hierarchy

A finder based on the importlib module.
Method contribute​_to​_path Get a list of extra paths where this finder can search.
Method find​_module Find the given module
Constant _SUFFIXES Undocumented

Inherited from Finder:

Method __init__ Undocumented
Instance Variable _path Undocumented
def contribute_to_path(self, spec, processed): (source)
Get a list of extra paths where this finder can search.
def find_module(self, modname, module_parts, processed, submodule_path): (source)

Find the given module

Each finder is responsible for each protocol of finding, as long as they all return a ModuleSpec.

Parameters
modnameUndocumented
module​_partsUndocumented
processedUndocumented
submodule​_pathUndocumented
str modnameThe module which needs to be searched.
list module​_partsIt should be a list of strings, where each part contributes to the module's namespace.
list processedWhat parts from the module parts were processed so far.
list submodule​_pathA list of paths where the module can be looked into.
Returns
A ModuleSpec, describing how and where the module was found, None, otherwise.
_SUFFIXES = (source)

Undocumented

Value
([(s, ModuleType.C_EXTENSION) for s in importlib.machinery.EXTENSION_SUFFIXES]+[(
s, ModuleType.PY_SOURCE) for s in importlib.machinery.SOURCE_SUFFIXES])+[(s, ModuleType.PY_COMPILED) for s in importlib.machinery.BYTECODE_SUFFIXES]