module documentation
(source)

_filter_stmts and helper functions. This method gets used in LocalsDictnodes.NodeNG._scope_lookup. It is not considered public.
Function _filter​_stmts Filter the given list of statements to remove ignorable statements.
Function _get​_filtered​_node​_statements Undocumented
Function _get​_if​_statement​_ancestor Return the first parent node that is an If node (or None)
Function _is​_from​_decorator Return True if the given node is the child of a decorator
def _filter_stmts(base_node, stmts, frame, offset): (source)

Filter the given list of statements to remove ignorable statements.

If base_node is not a frame itself and the name is found in the inner frame locals, statements will be filtered to remove ignorable statements according to base_node's location.

Parameters
base​_node:nodes.NodeNGUndocumented
stmts:list(nodes.NodeNG)The statements to filter.
frame:nodes.NodeNGThe frame that all of the given statements belong to.
offset:intThe line offset to filter statements up to.
Returns
list(nodes.NodeNG)The filtered statements.
def _get_filtered_node_statements(base_node, stmt_nodes): (source)

Undocumented

Parameters
base​_node:nodes.NodeNGUndocumented
stmt​_nodes:List[nodes.NodeNG]Undocumented
Returns
List[Tuple[nodes.NodeNG, nodes.Statement]]Undocumented
def _get_if_statement_ancestor(node): (source)
Return the first parent node that is an If node (or None)
Parameters
node:nodes.NodeNGUndocumented
Returns
Optional[nodes.If]Undocumented
def _is_from_decorator(node): (source)
Return True if the given node is the child of a decorator