Visual Studio Code

From David's Wiki
Revision as of 14:38, 14 July 2021 by David (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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