Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>PyPolishNew to Visual Studio Code? Get it now.
PyPolish

PyPolish

Goutham Kalla

|
3 installs
| (0) | Free
Zero-config Python polish on save: isort sorts imports, black formats, flake8 flags problems. Uses your project's own pyproject.toml / setup.cfg.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PyPolish

Install it and save. That's the whole setup.

PyPolish makes VS Code tidy every Python file when you save it:

  1. isort sorts and groups your imports.
  2. black formats the code.
  3. flake8 reports problems in the Problems panel as you type.

PyPolish has no code and no settings of its own. It installs Microsoft's official Black Formatter, isort and Flake8 extensions and sets the defaults that make them work together. Teams can then share one setup without committing a .vscode/settings.json.

Uses your project's config

Each tool reads the config your project already has, so the editor matches your CI and pre-commit hooks:

Tool Reads
black pyproject.toml ([tool.black])
isort pyproject.toml, setup.cfg, .isort.cfg
flake8 setup.cfg, tox.ini, .flake8

Files that black excludes (exclude / force-exclude) are left alone on save.

Tip: set profile = "black" under [tool.isort] so isort and black agree on import formatting. Without it they can undo each other's changes.

Which tool versions run

If black, isort or flake8 is installed in the Python interpreter you've selected, that version runs, so it matches the version your project pins. If not, the version bundled with the Microsoft extension runs instead.

Settings it changes

These are defaults only. Anything in your user or workspace settings wins.

{
  "[python]": {
    "editor.defaultFormatter": "ms-python.black-formatter",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": { "source.organizeImports": "explicit" }
  },
  "black-formatter.importStrategy": "fromEnvironment",
  "isort.importStrategy": "fromEnvironment",
  "flake8.importStrategy": "fromEnvironment"
}

For example, to turn off format on save for one workspace:

"[python]": { "editor.formatOnSave": false }

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft