poetry-plugin-sort-0.3.0
توضیحات
Poetry plugin to sort the dependencies alphabetically
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | poetry-plugin-sort-0.3.0 |
| نام | poetry-plugin-sort |
| نسخه کتابخانه | 0.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Andrei Shabanski |
| ایمیل نویسنده | shabanski.andrei@gmail.com |
| آدرس صفحه اصلی | https://github.com/andrei-shabanski/poetry-plugin-sort |
| آدرس اینترنتی | https://pypi.org/project/poetry-plugin-sort/ |
| مجوز | MIT |
# Poetry Plugin: Dependencies sorting
[](https://pypi.org/project/poetry-plugin-sort/)
[](https://pypi.org/project/poetry-plugin-sort/)
[](https://github.com/andrei-shabanski/poetry-plugin-sort/actions/workflows/test.yml)
This package is a plugin that sort dependencies alphabetically in pyproject.toml
after running `poetry init` and `poetry add`.
Since [Introduce dependency sorting #3996](https://github.com/python-poetry/poetry/pull/3996) pull request still open
this plugin is a workaround for [!312](https://github.com/python-poetry/poetry/issues/312) issue.
## Installation
Just use `poetry self add` command to add this plugin.
```bash
poetry self add poetry-plugin-sort
```
If you used pipx to install Poetry, add the plugin via `pipx inject` command.
```bash
pipx inject poetry poetry-plugin-sort
```
And if you installed Poetry using pip, you can install the plugin the same way.
```bash
pip install poetry poetry-plugin-sort
```
## Usage
The plugin sorts dependencies each time when you change dependencies via the `poetry init` and `poetry add` commands.
To sort dependencies without making changes to the dependencies list, the plugin provides a `sort` command.
```bash
poetry sort
```
### Available options
* `--check`: Checks if dependencies are sorted and exits with a non-zero status code when it doesn't.
### Configurations
The following configuration can be set in `[tool.poetry-sort]` section of the pyproject.toml file or as system-wide environment variables:
* `enabled` \ `POETRY_SORT_ENABLED`: Enable or disable sorting after invoking `poetry init` and `poetry add` commands. Default: `True`.
* `move-optionals-to-bottom` \ `POETRY_SORT_MOVE_OPTIONALS_TO_BOTTOM`: Move optional packages to the bottom. Default: `False`.
نیازمندی
| مقدار | نام |
|---|---|
| - | poetry>=1.2 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0,>=3.8 | Python |
نحوه نصب
نصب پکیج whl poetry-plugin-sort-0.3.0:
pip install poetry-plugin-sort-0.3.0.whl
نصب پکیج tar.gz poetry-plugin-sort-0.3.0:
pip install poetry-plugin-sort-0.3.0.tar.gz