dbaum
dbaum
Yes, using CommentKind works. But the *Kind types tend to make things more confusing. The developer needs to know that there's a second type hierarchy imported from a separate module...
Investigating a little further, it seems like the culprit is BlockRangeMixIn._elsed_block_range: https://github.com/PyCQA/astroid/blob/master/astroid/mixins.py#L43 Specifically, the logic here is that when an else clause is present, anything before the first line of...
Sure, I'll take a look.
I think I understand where the problem is coming from, though I'm not sure how to solve it. All of the real logic is in utils.FileState._collect_block_lines. This does a post-order...
I ran into this same problem. I believe the root cause is getChildIndentationLevel() returning the incorrect indentation level in this case. That leads to the CodeWriter having too big of...