
Informations about the execution will be displayed in the statusbar. If some text is selected, autopep8 will run on this text only. Press Shift+F8 (default) to run autopep8 on the current file or go to Source > Run autopep8 code autoformatting. You can only install this plugin from source and with any version of Spyder 3. This is a plugin to run the Autopep8 Python linter from within the Python IDE Spyder version 3. To auto-format a file or selection in Spyder 4.2.0, you need to go to the menu Source > Format file or selection or press the shortcut Ctrl + Alt + I ( Cmd + Alt + I in macOS).import math, sys def example1 (): This is a long comment.
To modify a file in place (with aggressive level 2): autopep8 -in-place -aggressive -aggressiveAs a result, the code from the cell above will look like this after the formatting is applied. From pip: pip install -upgrade autopep8 Consider using the -user option. However, auto-formatting was added to Spyder 4.2.0 (released in November 2020). pip install autopep8 Now in order to use it, you need to select cells that need formatting and click on the hammer button from the menu.



