Path 1: 8 calls (0.89)

TryExcept (3) TryFinally (2) If (1) While (1) For (1)

1 (4) 3 (2) 4 (1) 2 (1)

1def _count_statements(self, try_node: nodes.TryExcept | nodes.TryFinally) -> int:
2        statement_count = len(try_node.body)
3
4        for body_node in try_node.body:
5            if isinstance(body_node, (nodes.For, nodes.If, nodes.While, nodes.With)):
6                statement_count += self._count_statements(body_node)
7
8        return statement_count
            

Path 2: 1 calls (0.11)

TryExcept (1)

7 (1)

1def _count_statements(self, try_node: nodes.TryExcept | nodes.TryFinally) -> int:
2        statement_count = len(try_node.body)
3
4        for body_node in try_node.body:
5            if isinstance(body_node, (nodes.For, nodes.If, nodes.While, nodes.With)):
6                statement_count += self._count_statements(body_node)
7
8        return statement_count