Method: pylint.checkers.utils.returns_bool
Calls: 29, Exceptions: 0, Paths: 3Back
Path 1: 27 calls (0.93)
Return (27)
True (25) False (2)
1def returns_bool(node: nodes.NodeNG) -> bool:
2 """Returns true if a node is a nodes.Return that returns a constant boolean."""
3 return (
4 isinstance(node, nodes.Return)
5 and isinstance(node.value, nodes.Const)
6 and isinstance(node.value.value, bool)
7 )
Path 2: 1 calls (0.03)
Expr (1)
False (1)
1def returns_bool(node: nodes.NodeNG) -> bool:
2 """Returns true if a node is a nodes.Return that returns a constant boolean."""
3 return (
4 isinstance(node, nodes.Return)
5 and isinstance(node.value, nodes.Const)
6 and isinstance(node.value.value, bool)
7 )
Path 3: 1 calls (0.03)
Return (1)
False (1)
1def returns_bool(node: nodes.NodeNG) -> bool:
2 """Returns true if a node is a nodes.Return that returns a constant boolean."""
3 return (
4 isinstance(node, nodes.Return)
5 and isinstance(node.value, nodes.Const)
6 and isinstance(node.value.value, bool)
7 )