Configuring Autofolding Behavior
PyCharm allows displaying source code in a folded form, making it really concise, and hiding from view the details you might consider less important. When a file is first opened for editing, certain code constructs can be shown folded. It is up to you to define the desired set of code constructs to be folded by default. When you hover your mouse pointer over the collapsed code fragment, its preview is displayed in a pop-up window.
To configure autofolding behavior in the editor
Now, when you first open files for editing, the selected code constructs will be shown as shaded brief information, with the preview available at the mouse pointer.