module documentation

A library for accessing pytype's inferred local types.

Class MatchAstVisitor An AST visitor to match traces to nodes.
Class TypeTrace Traces of inferred type information.
Function trace Generates type traces for the given source code.
Class _LineNumberVisitor Undocumented
Class _SymbolMatcher Symbol matcher for MatchAstVisitor._get_traces.
Function _to_pytd Undocumented
Constant _ATTR_OPS Undocumented
Constant _CALL_OPS Undocumented
Constant _LOAD_OPS Undocumented
Constant _LOAD_SUBSCR_METHODS Undocumented
Constant _LOAD_SUBSCR_OPS Undocumented
Constant _STORE_OPS Undocumented
def trace(src, options=None): (source)

Generates type traces for the given source code. Args: src: The source text. options: A pytype.config.Options object that can be used to specify options such as the target Python version. Returns: A source.Code object.

def _to_pytd(datum, loader, ast): (source)

Undocumented

_ATTR_OPS = (source)

Undocumented

Value
frozenset(('LOAD_ATTR', 'LOAD_METHOD', 'STORE_ATTR'))
_CALL_OPS = (source)

Undocumented

Value
frozenset(('CALL_FUNCTION',
           'CALL_FUNCTION_EX',
           'CALL_FUNCTION_KW',
           'CALL_FUNCTION_VAR',
           'CALL_FUNCTION_VAR_KW',
           'CALL_METHOD'))
_LOAD_OPS = (source)

Undocumented

Value
frozenset(('LOAD_DEREF', 'LOAD_FAST', 'LOAD_GLOBAL', 'LOAD_NAME'))
_LOAD_SUBSCR_METHODS: tuple[str, ...] = (source)

Undocumented

Value
('__getitem__', '__getslice__')
_LOAD_SUBSCR_OPS = (source)

Undocumented

Value
frozenset(('BINARY_SUBSCR', 'SLICE_0', 'SLICE_1', 'SLICE_2', 'SLICE_3'))
_STORE_OPS = (source)

Undocumented

Value
frozenset(('STORE_DEREF', 'STORE_FAST', 'STORE_GLOBAL', 'STORE_NAME'))