module documentation

Use pytype to analyze and infer types for an entire project.

Class Action Undocumented
Class PytypeRunner Runs pytype over an import graph.
Class Stage Undocumented
Function deps_from_import_graph Construct PytypeRunner args from an importlab.ImportGraph instance.
Function escape_ninja_path escape `:` in absolute path on windows.
Function get_imports_map Get a short path -> full path map for the given deps.
Function resolved_file_to_module Turn an importlab ResolvedFile into a pytype Module.
Constant DEFAULT_PYI Undocumented
Constant FIRST_PASS_SUFFIX Undocumented
Constant PYTYPE_SINGLE Undocumented
Function _get_executable Get the path to the executable with the given name.
Function _get_filenames Undocumented
Function _is_type_stub Undocumented
Function _module_to_output_path Convert a module to an output path.
def deps_from_import_graph(import_graph): (source)

Construct PytypeRunner args from an importlab.ImportGraph instance. Kept as a separate function so PytypeRunner can be tested independently of importlab. Args: import_graph: An importlab.ImportGraph instance. Returns: List of (tuple of source modules, tuple of direct deps) in dependency order.

def escape_ninja_path(path: str): (source)

escape `:` in absolute path on windows.

def get_imports_map(deps, module_to_imports_map, module_to_output): (source)

Get a short path -> full path map for the given deps.

def resolved_file_to_module(f): (source)

Turn an importlab ResolvedFile into a pytype Module.

DEFAULT_PYI: str = (source)

Undocumented

Value
'''
from typing import Any
def __getattr__(name) -> Any: ...
'''
FIRST_PASS_SUFFIX: str = (source)

Undocumented

Value
'-1'
PYTYPE_SINGLE = (source)

Undocumented

Value
_get_executable('pytype-single', 'pytype.single')
def _get_executable(binary, module=None): (source)

Get the path to the executable with the given name.

def _get_filenames(node): (source)

Undocumented

def _is_type_stub(f): (source)

Undocumented

def _module_to_output_path(mod): (source)

Convert a module to an output path.