Method: pylint.checkers.utils.is_call_of_name
Calls: 5948, Exceptions: 0, Paths: 3Back
Path 1: 3941 calls (0.66)
Call (3941)
'len' (3910) 'bool' (31)
False (3827) True (114)
1def is_call_of_name(node: nodes.NodeNG, name: str) -> bool:
2 """Checks if node is a function call with the given name."""
3 return (
4 isinstance(node, nodes.Call)
5 and isinstance(node.func, nodes.Name)
6 and node.func.name == name
7 )
Path 2: 1738 calls (0.29)
Call (1738)
'len' (1738)
False (1738)
1def is_call_of_name(node: nodes.NodeNG, name: str) -> bool:
2 """Checks if node is a function call with the given name."""
3 return (
4 isinstance(node, nodes.Call)
5 and isinstance(node.func, nodes.Name)
6 and node.func.name == name
7 )
Path 3: 269 calls (0.05)
Compare (62) BoolOp (40) Assign (38) Name (37) Expr (32) Return (18) UnaryOp (14) NamedExpr (11) ExceptHandler (4) Const (4)
'bool' (183) 'len' (86)
False (269)
1def is_call_of_name(node: nodes.NodeNG, name: str) -> bool:
2 """Checks if node is a function call with the given name."""
3 return (
4 isinstance(node, nodes.Call)
5 and isinstance(node.func, nodes.Name)
6 and node.func.name == name
7 )