module documentation
Undocumented
Class |
|
Stack for objects that may potentially trigger a R1732 message if they are not used in a ``with`` block later on. |
Constant | BUILTIN |
Undocumented |
Constant | CALLS |
Undocumented |
Constant | CALLS |
Undocumented |
Constant | KNOWN |
Undocumented |
Type Alias |
|
Undocumented |
Function | _except |
Detect if all except statements return. |
Function | _if |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Check whether use of a variable is happening as part of the left-hand side of an assignment. |
Function | _is |
Checks if one of the node's parents is a ``nodes.With`` node and that the node itself is located somewhere under its ``items``. |
Function | _is |
Check if the given token is a trailing comma. |
Function | _will |
Checks if a call that could be used in a ``with`` statement is used in an alternative construct which would ensure that its __exit__ method is called. |
Undocumented
Value |
|
Undocumented
Value |
|
def _except_statement_is_always_returning(node:
nodes.TryExcept
, returning_node_class: nodes.NodeNG
) -> bool
:
(source)
¶
Detect if all except statements return.
def _if_statement_is_always_returning(if_node:
nodes.If
, returning_node_class: nodes.NodeNG
) -> bool
:
(source)
¶
Undocumented
Check whether use of a variable is happening as part of the left-hand side of an assignment. This requires recursive checking, because destructuring assignment can have arbitrarily nested tuples and lists to unpack.
Checks if one of the node's parents is a ``nodes.With`` node and that the node itself is located somewhere under its ``items``.
Check if the given token is a trailing comma. :param tokens: Sequence of modules tokens :type tokens: list[tokenize.TokenInfo] :param int index: Index of token under check in tokens :returns: True if the token is a comma which trails an expression :rtype: bool