Method: pylint.checkers.utils.is_error
Calls: 3805, Exceptions: 0, Paths: 1Back
Path 1: 3805 calls (1.0)
FunctionDef (3724) AsyncFunctionDef (54) UnboundMethod (16) BoundMethod (11)
False (3732) True (73)
1def is_error(node: nodes.FunctionDef) -> bool:
2 """Return true if the given function node only raises an exception."""
3 return len(node.body) == 1 and isinstance(node.body[0], nodes.Raise)