{"id":24452,"library":"python-lsp-black","title":"python-lsp-black","description":"A Black plugin for the Python LSP Server (python-lsp-server). Formats Python code using Black on save or on demand. Current version 2.0.0 requires python-lsp-server and Black >= 23.11.0. Initial release cadence was ~yearly, now slower.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/python-lsp/python-lsp-black","tags":["lsp","black","formatter","python-lsp-server"],"install":[{"cmd":"pip install python-lsp-black","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core LSP server this plugin extends","package":"python-lsp-server","optional":false},{"reason":"The formatter engine; requires >= 23.11.0 for v2.0.0","package":"black","optional":false}],"imports":[{"note":"Plugin is auto-discovered by python-lsp-server when installed. Do not import directly.","symbol":"plugin","correct":"No import needed; auto-loaded via entry point"}],"quickstart":{"code":"# Ensure python-lsp-server and python-lsp-black are installed\n# Then, in your editor with LSP client configured for pylsp,\n# Black formatting should work automatically.\n# You can configure via pylsp settings, e.g.:\n# pylsp.plugins.black.line_length = 88","lang":"python","description":"After installation, black formatting is available. No explicit import needed."},"warnings":[{"fix":"In your LSP configuration, change 'pylsp.plugins.pylsp_black' to 'pylsp.plugins.black'.","message":"Entrypoint name changed from 'pylsp_black' to 'black' in v2.0.0. Existing configuration using 'pylsp.plugins.pylsp_black' must be updated to 'pylsp.plugins.black'.","severity":"breaking","affected_versions":"<2.0.0 -> >=2.0.0"},{"fix":"Set pylsp.plugins.autopep8.enabled = True and pylsp.plugins.yapf.enabled = True in your config after installing python-lsp-black (not recommended).","message":"This plugin automatically disables autopep8 and yapf formatters to avoid conflicts. If you need those, remove python-lsp-black or configure pylsp to re-enable them manually.","severity":"gotcha","affected_versions":">=1.2.1"},{"fix":"Use Python 3.8 or later, or pin to python-lsp-black <2.0.0 (last 1.3.0).","message":"Python 3.7 support dropped in v2.0.0.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install python-lsp-server","cause":"python-lsp-server not installed","error":"ModuleNotFoundError: No module named 'pylsp'"},{"fix":"Update your config: replace 'pylsp_black' with 'black' or reinstall python-lsp-black to ensure entry points are registered.","cause":"Config still uses old entry point name 'pylsp_black' with python-lsp-black v2.0.0","error":"black failed to start: Entry point 'black' not found in config"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}