This is sort of a plugin for poetry which add comments with description for every dependency in pyproject.toml
based on poetry
.lock file.
So your dependencies will look like
[tool.poetry.dependencies] python = "^3.7" toml = "^0.10.0" # Python Library for Tom's Obvious, Minimal Language ·· https://pypi.org/project/toml/ [tool.poetry.dev-dependencies] pytest = "^5.2" # pytest: simple powerful testing with Python ·· https://pypi.org/project/pytest/ mock = "^4.0.2" # Rolling backport of unittest.mock for all Pythons ·· https://pypi.org/project/mock/
Install via poetry
poetry add --dev poetry-deps-formatter
Install via PIP
pip install poetry-deps-formatter
Then you have to add it to tool.poetry.scripts
section of your pyproject.toml
file.
[tool.poetry.scripts] format = "poetry_deps_formatter:formatter"
poetry run format