Pycharm, my import lines are all collapsed, how to stop this?

I’m new to Pycharm and Python.

I have Pycharm 2023.3.2 on Windows 10. In my Python code the import lines are all collapsed into “import …”. How do I stop this and always see all import lines in all .py files?

Hi !

You’ll find the folding options (way more options than just for Python imports) under Settings / Editor / General / Code folding :wink:

1 Like

PyCharm calls this “folding”. You can toggle folding by clicking on the fold/unfold symbols in the gutter or using the shortcut CTRL+..

You can change what gets folded by default under Editor > General > Code Folding. In this case, you’d want to uncheck “Imports”.