class documentation
class Finder: (source)
Known subclasses: astroid.interpreter._import.spec.ImportlibFinder, astroid.interpreter._import.spec.PathSpecFinder, astroid.interpreter._import.spec.ZipFinder
Constructor: Finder(path)
A finder is a class which knows how to find a particular module.
| Method | __init__ |
Undocumented |
| Method | contribute |
Get a list of extra paths where this finder can search. |
| Method | find |
Find the given module |
| Instance Variable | _path |
Undocumented |
overridden in
astroid.interpreter._import.spec.ImportlibFinder, astroid.interpreter._import.spec.PathSpecFinderGet a list of extra paths where this finder can search.
@abc.abstractmethod
def find_module(self, modname, module_parts, processed, submodule_path): (source) ¶
def find_module(self, modname, module_parts, processed, submodule_path): (source) ¶
overridden in
astroid.interpreter._import.spec.ImportlibFinder, astroid.interpreter._import.spec.PathSpecFinder, astroid.interpreter._import.spec.ZipFinderFind the given module
Each finder is responsible for each protocol of finding, as long as they all return a ModuleSpec.
| Parameters | |
| modname | Undocumented |
| module | Undocumented |
| processed | Undocumented |
| submodule | Undocumented |
| str modname | The module which needs to be searched. |
| list module | It should be a list of strings, where each part contributes to the module's namespace. |
| list processed | What parts from the module parts were processed so far. |
| list submodule | A list of paths where the module can be looked into. |
| Returns | |
| A ModuleSpec, describing how and where the module was found, None, otherwise. | |