How to get pyCharm to stop hiding (my) python import?

Each time I open the python module file, pyCharm will hide all the imports and show

import ... 

in the editor.

I need to manually deploy it to see the import. Where can I find the option to cancel the automatic hiding of import statements? Thank!

EDIT: Added folding code to tags.

+42
python import pycharm code-folding
Aug 05 '14 at 9:24
source share
2 answers

Since this question may be useful for people who are also not looking for the term β€œcode folding,” I will answer my comment.

As extracted from IntelliJ IDEA 13.1.0 Web Help , but also worked on PyCharm CE 3.4.1:

  • Open the IDE options (File> Preferences or Ctrl + Alt + S).
  • In the Editor section of the node, click Hide Code. The Code Fold page is displayed.
  • In the "Collapse by default" list, check the boxes to the left of the generated code structures that you want to view. So, here you can uncheck the "Import" box.
  • Apply changes.

The following figure shows what it looks like:

enter image description here

+48
Aug 6 '14 at 9:15
source share
β€” -

Pycharm 2016 settings

Actually in pycharm 2016.1 it Editor -> General -> Code Folding

+18
Apr 6 '16 at 7:37
source share



All Articles