PyCharm Code Folding/Outlining Generates Wrong Boundaries

前端 未结 2 1862
旧时难觅i
旧时难觅i 2021-01-02 23:36

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 co

2条回答
  •  滥情空心
    2021-01-03 00:00

    Finally!! I figured out how to remove the invalid folding regions. If you place your cursor on the line that starts an invalid folding block (line 106 in my first example), then right click anywhere in that line and select Folding -> Fold Selection / Remove Region and that will delete the incorrect folding annotation!

    I still have no clue why they are generated in the first place, but at least this is a decent "fix".

提交回复
热议问题