Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rupert/pyls-black
Black plugin for the Python Language Server
https://github.com/rupert/pyls-black
Last synced: 30 days ago
JSON representation
Black plugin for the Python Language Server
- Host: GitHub
- URL: https://github.com/rupert/pyls-black
- Owner: rupert
- License: mit
- Created: 2018-06-14T23:15:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-04T21:23:18.000Z (almost 3 years ago)
- Last Synced: 2024-09-18T05:32:00.862Z (3 months ago)
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 72
- Watchers: 6
- Forks: 9
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyls-black
[![PyPI](https://img.shields.io/pypi/v/pyls-black.svg)](https://pypi.org/project/pyls-black/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
> [Black](https://github.com/ambv/black) plugin for the [Python Language Server](https://github.com/palantir/python-language-server).
In the same `virtualenv` as `python-language-server`:
```shell
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](https://github.com/ambv/black#pyprojecttoml) if it has one.See the [wiki](https://github.com/rupert/pyls-black/wiki) for instructions on how to use `pyls-black` with popular text editors.