module documentation
Astroid hooks for the Python standard library.
Function | infer |
Specific inference function for enum Call node. |
Function | infer |
Specific inference for enums. |
Function | infer |
Specific inference function for namedtuple or Python 3 enum. |
Function | infer |
Specific inference function for namedtuple Call node. |
Function | infer |
Infer a typing.NamedTuple(...) call. |
Function | infer |
Infer a subclass of typing.NamedTuple. |
Function | infer |
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 |
Undocumented |
Constant | ENUM |
Undocumented |
Constant | INT |
Undocumented |
Constant | TYPING |
Undocumented |
Constant | TYPING |
Undocumented |
Function | _check |
Undocumented |
Function | _find |
Undocumented |
Function | _get |
Get and return fields of a NamedTuple in code-as-a-string. |
Function | _get |
Undocumented |
Function | _has |
Predicate for class inference tip. |
Function | _infer |
Undocumented |
Function | _is |
Return whether cls is a subclass of an Enum. |
Function | _looks |
Undocumented |
Variable | _looks |
Undocumented |
Variable | _looks |
Undocumented |
Variable | _looks |
Undocumented |
def infer_enum(node:
nodes.Call
, context: InferenceContext|None
= None) -> Iterator[ bases.Instance]
:
(source)
¶
Specific inference function for enum Call node.
def infer_func_form(node:
nodes.Call
, base_type: list[ nodes.NodeNG]
, context: InferenceContext|None
= None, enum: bool
= False) -> tuple[ nodes.ClassDef, str, list[ str]]
:
(source)
¶
Specific inference function for namedtuple or Python 3 enum.
def infer_named_tuple(node:
nodes.Call
, context: InferenceContext|None
= None) -> Iterator[ nodes.ClassDef]
:
(source)
¶
Specific inference function for namedtuple Call node.
def infer_typing_namedtuple(node:
nodes.Call
, context: InferenceContext|None
= None) -> Iterator[ nodes.ClassDef]
:
(source)
¶
Infer a typing.NamedTuple(...) call.
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.
Undocumented
Value |
|
Get and return fields of a NamedTuple in code-as-a-string. Because the fields are represented in their code form we can extract a node from them later on.