class documentation

class _PathFinder: (source)

View In Hierarchy

Find a filepath for a module.

Method __init__ Undocumented
Method find_import Search through pythonpath for a module.
Method get_pyi_path Get a pyi file from path if it exists.
Instance Variable options Undocumented
def __init__(self, options: config.Options): (source)

Undocumented

def find_import(self, module_name: str) -> Tuple[Optional[str], bool]: (source)

Search through pythonpath for a module. Loops over self.options.pythonpath, taking care of the semantics for __init__.pyi, and pretending there's an empty __init__.pyi if the path (derived from module_name) is a directory. Args: module_name: module name Returns: - (path, file_exists) if we find a path (file_exists will be false if we have found a directory where we need to create an __init__.pyi) - (None, None) if we cannot find a full path

def get_pyi_path(self, path: str) -> Optional[str]: (source)

Get a pyi file from path if it exists.

Undocumented