module documentation

Various context related utilities, including inference and call contexts.

Class CallContext Holds information for a call site.
Class InferenceContext Provide context for inference.
Function bind_context_to_node Give a context a boundnode to retrieve the correct function name or attribute value with from further inference.
Function copy_context Clone a context if given, or return a fresh context.
Function _invalidate_cache Undocumented
Constant _INFERENCE_CACHE Undocumented
Type Alias _InferenceCache Undocumented
def bind_context_to_node(context: InferenceContext|None, node) -> InferenceContext: (source)

Give a context a boundnode to retrieve the correct function name or attribute value with from further inference. Do not use an existing context since the boundnode could then be incorrectly propagated higher up in the call stack. :param node: Node to do name lookups from :type node NodeNG: :returns: A new context :rtype: InferenceContext

Clone a context if given, or return a fresh context.

def _invalidate_cache(): (source)

Undocumented

_INFERENCE_CACHE: _InferenceCache = (source)

Undocumented

Value
{}
_InferenceCache = (source)

Undocumented

Value
Dict[Tuple['NodeNG', Optional[str], Optional[str], Optional[str]],
     Sequence['NodeNG']]