Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


PyPI Code style: black

Black plugin for the Python Language Server.

In the same virtualenv as python-language-server:

pip3 install pyls-black

To avoid unexpected results you should make sure yapf and autopep8 are not installed.

  • pyls-black can either format an entire file or just the selected text.
  • The code will only be formatted if it is syntactically valid Python.
  • Text selections are treated as if they were a separate Python file. Unfortunately this means you can't format an indented block of code.
  • pyls-black will use your project's pyproject.toml if it has one.

See the wiki for instructions on how to use pyls-black with popular text editors.