textproc/py-python-lsp-black: New port: Black plugin for the Python LSP Server

This commit is contained in:
Yuri Victorovich
2022-10-13 10:33:50 -07:00
parent 586b19abba
commit a373e0d093
4 changed files with 39 additions and 0 deletions

View File

@@ -1459,6 +1459,7 @@
SUBDIR += py-python-docs-theme
SUBDIR += py-python-docx
SUBDIR += py-python-gettext
SUBDIR += py-python-lsp-black
SUBDIR += py-python-lsp-jsonrpc
SUBDIR += py-python-lsp-server
SUBDIR += py-python-markdown-math

View File

@@ -0,0 +1,20 @@
PORTNAME= python-lsp-black
DISTVERSION= 1.2.1
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Black plugin for the Python LSP Server
WWW= https://github.com/python-lsp/python-lsp-black
LICENSE= MIT
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-lsp-server>=1.4.0:textproc/py-python-lsp-server@${PY_FLAVOR}
USES= python:3.7+
USE_PYTHON= distutils autoplist pytest
NO_ARCH= yes
.include <bsd.port.mk>

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1665679561
SHA256 (python-lsp-black-1.2.1.tar.gz) = d7eaeab2a377e96a82cc26afe2f8f2e1cf7c6eaefdcdeab026343e2e559dcce9
SIZE (python-lsp-black-1.2.1.tar.gz) = 5392

View File

@@ -0,0 +1,15 @@
Black plugin for the Python LSP Server.
* This plugin will disable the yapf and autopep8 plugins if installed.
* python-lsp-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.
* python-lsp-black will use your project's pyproject.toml if it has one.
* python-lsp-black only officially supports the latest stable version of
black. An effort is made to keep backwards-compatibility but older black
versions will not be actively tested.
* The plugin can cache the black configuration that applies to each Python file,
this improves performance of the plugin. When configuration caching is
enabled any changes to black's configuration will need the LSP server to be
restarted. Configuration caching can be disabled with the cache_config option.