module documentation

Utilities for working with pytype source files.

Exception NoSuchDirectory Undocumented
Function get_full_path Full path to a file or directory within the pytype source tree.
Function list_files List files in the directory rooted at |basedir|.
Function list_pytype_files Recursively get the contents of a directory in the pytype installation.
Function load_binary_file Undocumented
Function load_text_file Undocumented
Function _load_data_file Get the contents of a data file from the pytype installation.
Function _pytype_source_dir The base directory of the pytype source tree.
def get_full_path(path): (source)

Full path to a file or directory within the pytype source tree. Arguments: path: An absolute or relative path. Returns: path for absolute paths. full path resolved relative to pytype/ for relative paths.

def list_files(basedir): (source)

List files in the directory rooted at |basedir|.

def list_pytype_files(suffix): (source)

Recursively get the contents of a directory in the pytype installation. This reports files in said directory as well as all subdirectories of it. Arguments: suffix: the path, relative to "pytype/" Yields: The filenames, relative to pytype/{suffix} Raises: NoSuchDirectory: if the directory doesn't exist.

def load_binary_file(filename): (source)

Undocumented

def load_text_file(filename): (source)

Undocumented

def _load_data_file(filename, text): (source)

Get the contents of a data file from the pytype installation. Arguments: filename: the path, relative to "pytype/" text: whether to load the file as text or bytes. Returns: The contents of the file as a bytestring Raises: IOError: if file not found

def _pytype_source_dir(): (source)

The base directory of the pytype source tree.