Handy code actions for python-lsp-server
Project description
PyLSP Code Actions
Handy code actions for python-lsp-server
This is a plugin for python-lsp-server
which adds a few handy code actions
that I always missed:
- Flip comma or other operand
- Sort keyword arguments by name
- Order keyword arguments as in the called function
- Sort dict literal by keys
- Generate docstring for function/method
- Add / Remove
Annotated[...]
around a type annotation
Installation
Run the following command in the same venv as the server itself:
pip install pylsp-code-actions
If you are using neovim and mason, use:
:PylspInstall pylsp-code-actions
(I use neovim too btw. I also use Arch btw.)
To set up a development environment, clone the project and install it in editable mode, again in the same virtual environment as the server itself:
git clone https://github.com/DSD-DBS/pylsp-code-actions
cd pylsp-code-actions
source ~/.../pylsp-server-venv/bin/activate # (replace with the correct path)
pip install -U pip pre-commit
pip install -e .
pre-commit install
git config commit.template .git_commit_template
Contributing
We'd love to see your bug reports and improvement suggestions! Please take a look at our guidelines for contributors for details.
Licenses
This project is compliant with the REUSE Specification Version 3.0.
Copyright DB InfraGO AG, licensed under Apache 2.0 (see full text in LICENSES/Apache-2.0.txt)
Dot-files are licensed under CC0-1.0 (see full text in LICENSES/CC0-1.0.txt)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pylsp_code_actions-0.1.dev4.tar.gz
.
File metadata
- Download URL: pylsp_code_actions-0.1.dev4.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75765f79c257acce28e0334ea86d83756267095c57f860a56299e934ffd47bc5 |
|
MD5 | 36c232f55b00c5ec2b80f0d7c401d8d8 |
|
BLAKE2b-256 | bb18ba286f4e2ed778197198922c5d3ecd1c224d5299b984c2ed817fa53cfefd |
File details
Details for the file pylsp_code_actions-0.1.dev4-py3-none-any.whl
.
File metadata
- Download URL: pylsp_code_actions-0.1.dev4-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 358f10f701c396bf1fe2128cc1060d30e4375dc7340828d4632104b7d7ab6b21 |
|
MD5 | 1d6747d64dff4f860cbf49e833cc7a4a |
|
BLAKE2b-256 | fee9799280f095a3b13a3afa0df9989d5972f69c44d5afaa3bfc5b794b0dedca |