Visual Studio Code
Visual Studio Code
Preferences
Python Formatter
Open your preferences file and set the following to use yapf:
"python.formatting.provider": "yapf", "python.formatting.yapfArgs": [ "--style", "{based_on_style: yapf, indent_width: 4}" ], "editor.formatOnPaste": true, "editor.formatOnType": true