Description
Question
If I write a lengthy function, the too-many-statements
checker rightfully complains about that. The obvious solution is to factor out code into separate functions. If those functions are not useful outside this function, I nest them into the function calling them. If I do that, the checker still considers those statements for complaining about the outer function. Is this a bug in the checker implementation or is there a good reason the checker discourages form using nested functions?
Documentation for future user
Documentation should elaborate on what it includes in the calculation on the documentation page https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/too-many-statements.html.
For not obvious cases, like nested code, it should also provide rationale about the decision.
Additional context
No response