Method: pylint.checkers.utils.assigned_bool
Calls: 22, Exceptions: 0, Paths: 2Back
Path 1: 16 calls (0.73)
None (15) Expr (1)
False (16)
1def assigned_bool(node: nodes.NodeNG) -> bool:
2 """Returns true if a node is a nodes.Assign that returns a constant boolean."""
3 return (
4 isinstance(node, nodes.Assign)
5 and isinstance(node.value, nodes.Const)
6 and isinstance(node.value.value, bool)
7 )
Path 2: 6 calls (0.27)
Assign (6)
True (5) False (1)
1def assigned_bool(node: nodes.NodeNG) -> bool:
2 """Returns true if a node is a nodes.Assign that returns a constant boolean."""
3 return (
4 isinstance(node, nodes.Assign)
5 and isinstance(node.value, nodes.Const)
6 and isinstance(node.value.value, bool)
7 )