YAPF Plugin

Wrapper plugin that formats python files via YAPF.

This is a process plugin. Using this will cause the CLI to download, run, and communicate with a separate process that is not sandboxed (unlike WASM plugins).

Install and Setup

Follow the instructions at https://github.com/dprint/dprint-plugin-yapf/releases/

Configuration

See YAPF's configuration here and specify the "yapf" property in .dprintrc.json.

{
  // ...etc...
  "yapf": {
    "based_on_style": "pep8",
    "spaces_before_comment": 4
  }
}