Number of source lines a `compound_statement` spans (end - start + 1). Returns 0 when the node is missing.
(body_node)
| 1234 | |
| 1235 | |
| 1236 | def _function_body_lines(body_node) -> int: |
| 1237 | """Number of source lines a `compound_statement` spans (end - start + 1). |
| 1238 | Returns 0 when the node is missing.""" |
| 1239 | if body_node is None: |
| 1240 | return 0 |
| 1241 | return body_node.end_point[0] - body_node.start_point[0] + 1 |
| 1242 | |
| 1243 | |
| 1244 | def _max_nesting_depth(body_node) -> int: |