I'm having a very frustrating issue with PyCharm in that it does not want to properly outline the code so that blocks fold correctly. I've looked all over the place and couldn't find any help with this particular problem. In a nutshell, PyCharm seems to decide on skewed block boundaries so that the blocks fold up on each other. It's quite irritating. Any thoughts?
Example of Incorrect Folding Behavior:
Trying to collapse _get_thread_name
yields this:
Example of Correct Folding Behavior: