PyCharm
 
Get PyCharm

Reformat and rearrange code

Last modified: 20 January 2025

PyCharm lets you reformat your code according to the requirements you've specified in your current code style scheme or the .editorconfig file. If anything is not defined in .editorconfig, it is taken from the project settings.

You can reformat a part of code, the whole file, a group of files, a directory, and a module. You can also exclude part of code or some files from the reformatting. PyCharm adheres to PEP 8 rules and requirements for arranging and formatting Python code.