module documentation
(source)

Astroid hooks for the Python standard library.
Function infer​_enum Specific inference function for enum Call node.
Function infer​_enum​_class Specific inference for enums.
Function infer​_func​_form Specific inference function for namedtuple or Python 3 enum.
Function infer​_named​_tuple Specific inference function for namedtuple Call node
Function infer​_typing​_namedtuple Infer a typing.NamedTuple(...) call.
Function infer​_typing​_namedtuple​_class Infer a subclass of typing.NamedTuple
Function infer​_typing​_namedtuple​_function Starting with python3.9, NamedTuple is a function of the typing module. The class NamedTuple is build dynamically through a call to type during initialization of the _NamedTuple variable.
Constant ENUM​_BASE​_NAMES Undocumented
Constant INT​_FLAG​_ADDITION​_METHODS Undocumented
Constant TYPING​_NAMEDTUPLE​_BASENAMES Undocumented
Function _check​_namedtuple​_attributes Undocumented
Function _find​_func​_form​_arguments Undocumented
Function _get​_renamed​_namedtuple​_attributes Undocumented
Function _has​_namedtuple​_base Predicate for class inference tip
Function _infer​_first Undocumented
Function _is​_enum​_subclass Return whether cls is a subclass of an Enum.
Function _looks​_like Undocumented
Variable _looks​_like​_enum Undocumented
Variable _looks​_like​_namedtuple Undocumented
Variable _looks​_like​_typing​_namedtuple Undocumented
def infer_enum(node, context=None): (source)
Specific inference function for enum Call node.
def infer_enum_class(node): (source)
Specific inference for enums.
def infer_func_form(node, base_type, context=None, enum=False): (source)
Specific inference function for namedtuple or Python 3 enum.
def infer_named_tuple(node, context=None): (source)
Specific inference function for namedtuple Call node
def infer_typing_namedtuple(node, context=None): (source)
Infer a typing.NamedTuple(...) call.
def infer_typing_namedtuple_class(class_node, context=None): (source)
Infer a subclass of typing.NamedTuple
def infer_typing_namedtuple_function(node, context=None): (source)
Starting with python3.9, NamedTuple is a function of the typing module. The class NamedTuple is build dynamically through a call to type during initialization of the _NamedTuple variable.
ENUM_BASE_NAMES: set[str] = (source)

Undocumented

Value
set(['Enum', 'IntEnum', 'enum.Enum', 'enum.IntEnum', 'IntFlag', 'enum.IntFlag'])
INT_FLAG_ADDITION_METHODS: str = (source)

Undocumented

Value
'''
    def __or__(self, other):
        return {name}(self.value | other.value)
    def __and__(self, other):
        return {name}(self.value & other.value)
    def __xor__(self, other):
        return {name}(self.value ^ other.value)
...
TYPING_NAMEDTUPLE_BASENAMES: set[str] = (source)

Undocumented

Value
set(['NamedTuple', 'typing.NamedTuple'])
def _check_namedtuple_attributes(typename, attributes, rename=False): (source)

Undocumented

def _find_func_form_arguments(node, context): (source)

Undocumented

def _get_renamed_namedtuple_attributes(field_names): (source)

Undocumented

def _has_namedtuple_base(node): (source)
Predicate for class inference tip
Parameters
node:ClassDefUndocumented
Returns
boolUndocumented
def _infer_first(node, context): (source)

Undocumented

def _is_enum_subclass(cls): (source)
Return whether cls is a subclass of an Enum.
Returns
boolUndocumented
def _looks_like(node, name): (source)

Undocumented

_looks_like_enum = (source)

Undocumented

_looks_like_namedtuple = (source)

Undocumented

_looks_like_typing_namedtuple = (source)

Undocumented