Reformat Code
Tell PyCharm to clean up indentation and other code style in your file.
Perhaps you copy and pasted some code with a different line length than your other code. Or you join a project where the other have sinned against all the gods with their heretical indentation spacing. Tabs?!
PyCharm makes it easy to set code styles in wildly flexible ways (project
vs. IDE, EditorConfig files, inline markers to suppress, etc.)
But PyCharm makes it even easier to apply those code styles with the
Reformat Code
action.
This action has an easy shortcut and can be applied to an entire file, a selection, or across many files in the project. With PyCharm Professional, you can also use it outside of Python, in JavaScript, CSS, etc.