module documentation
(source)

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): (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): (source)

Undocumented

def _looks_like_nested_from_six_with_metaclass(node): (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

Parameters
modname:strName of failed module
Returns
nodes.ModuleAn astroid module
_IMPORTS: str = (source)

Undocumented

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