module documentation

Astroid hooks for six module.

Function default_predicate Undocumented
Function six_moves_transform Undocumented
Function transform_six_add_metaclass Check if the given class node is decorated with *six.add_metaclass*.
Function transform_six_with_metaclass Check if the given class node is defined with *six.with_metaclass*.
Constant SIX_ADD_METACLASS Undocumented
Constant SIX_WITH_METACLASS Undocumented
Function _indent Adds 'prefix' to the beginning of selected lines in 'text'.
Function _looks_like_decorated_with_six_add_metaclass Undocumented
Function _looks_like_nested_from_six_with_metaclass Undocumented
Function _six_fail_hook Fix six.moves imports due to the dynamic nature of this class.
Constant _IMPORTS Undocumented
def default_predicate(line): (source)

Undocumented

def six_moves_transform(): (source)

Undocumented

def transform_six_add_metaclass(node): (source)

Check if the given class node is decorated with *six.add_metaclass*. If so, inject its argument as the metaclass of the underlying class.

def transform_six_with_metaclass(node): (source)

Check if the given class node is defined with *six.with_metaclass*. If so, inject its argument as the metaclass of the underlying class.

SIX_ADD_METACLASS: str = (source)

Undocumented

Value
'six.add_metaclass'
SIX_WITH_METACLASS: str = (source)

Undocumented

Value
'six.with_metaclass'
def _indent(text, prefix, predicate=default_predicate) -> str: (source)

Adds 'prefix' to the beginning of selected lines in 'text'. If 'predicate' is provided, 'prefix' will only be added to the lines where 'predicate(line)' is True. If 'predicate' is not provided, it will default to adding 'prefix' to all non-empty lines that do not consist solely of whitespace characters.

def _looks_like_decorated_with_six_add_metaclass(node) -> bool: (source)

Undocumented

def _looks_like_nested_from_six_with_metaclass(node) -> bool: (source)

Undocumented

def _six_fail_hook(modname): (source)

Fix six.moves imports due to the dynamic nature of this class. Construct a pseudo-module which contains all the necessary imports for six :param modname: Name of failed module :type modname: str :return: An astroid module :rtype: nodes.Module

_IMPORTS: str = (source)

Undocumented

Value
'''
import _io
cStringIO = _io.StringIO
filter = filter
from itertools import filterfalse
input = input
from sys import intern
...