If this is not the case or you wish to use another version of autopep8, all you need to do is configure the path as follows either in the User or Workspace settings file: '8Path': 'c:/path/autopep8.exe' If this cannot be found, then the formatter will be resolved based on the current environment Path settings. As the Extension will resolve the path to the formatter based on Python executable being used or configured in python.pythonPath of settings.json.
Pip install -upgrade autopep8 Custom Path You can configure the format provider by changing a setting in the User or Workspace settings file as follows: '': 'autopep8' However Mac/Linux paths are also supported. PathsĪll samples provided here are for windows. Auto Formattingįormatting the source code as and when you save the contents of the file is supported.Įnabling this requires configuring the setting 'editor.formatOnSave': true as identified here. The default code format provider is autopep8. Code formatting is supported using either one of yapf or autopep8.