PyCharm is a dedicated Python Integrated Development Environment (IDE) providing a wide range of essential tools for Python developers, tightly integrated to create a convenient environment for productive Python, web, and data science development.
PyCharm adheres to PEP8 rules and requirements for arranging and formatting Python code.
Reformat line indents
You can reformat line indents based on the specified settings.
You can configure the IDE to reformat code in modified files automatically when your changes are saved.
Press Ctrl Alt S to open settings and then select Tools | Actions on Save.