Method: pylint.checkers.utils.is_function_body_ellipsis
Calls: 122, Exceptions: 0, Paths: 4Back
Path 1: 108 calls (0.89)
FunctionDef (108)
False (108)
1def is_function_body_ellipsis(node: nodes.FunctionDef) -> bool:
2 """Checks whether a function body only consists of a single Ellipsis."""
3 return (
4 len(node.body) == 1
5 and isinstance(node.body[0], nodes.Expr)
6 and isinstance(node.body[0].value, nodes.Const)
7 and node.body[0].value.value == Ellipsis
8 )
Path 2: 12 calls (0.1)
FunctionDef (12)
True (12)
1def is_function_body_ellipsis(node: nodes.FunctionDef) -> bool:
2 """Checks whether a function body only consists of a single Ellipsis."""
3 return (
4 len(node.body) == 1
5 and isinstance(node.body[0], nodes.Expr)
6 and isinstance(node.body[0].value, nodes.Const)
7 and node.body[0].value.value == Ellipsis
8 )
Path 3: 1 calls (0.01)
FunctionDef (1)
False (1)
1def is_function_body_ellipsis(node: nodes.FunctionDef) -> bool:
2 """Checks whether a function body only consists of a single Ellipsis."""
3 return (
4 len(node.body) == 1
5 and isinstance(node.body[0], nodes.Expr)
6 and isinstance(node.body[0].value, nodes.Const)
7 and node.body[0].value.value == Ellipsis
8 )
Path 4: 1 calls (0.01)
FunctionDef (1)
False (1)
1def is_function_body_ellipsis(node: nodes.FunctionDef) -> bool:
2 """Checks whether a function body only consists of a single Ellipsis."""
3 return (
4 len(node.body) == 1
5 and isinstance(node.body[0], nodes.Expr)
6 and isinstance(node.body[0].value, nodes.Const)
7 and node.body[0].value.value == Ellipsis
8 )