Skip to main content

poetry plugin to register wrapped commands to use as pre-commit-hooks

Project description

poetry-plugin-hook

PyPI - Python Version PyPI - Version PyPI - Downloads PyPI - License GitHub - Pytest GitHub - Page GitHub - Release pre-commit codecov


poetry plugin to register wrapped commands to use as pre-commit-hooks. all hook commands return zero on success and non-zero on failure.

install

$ pip install poetry-plugin-hook

or with poetry

$ poetry self add poetry-plugin-hook

hook latest

Wrapper for poetry show -o -T command.

Exit code represents the number of outdated packages.

$ poetry hook latest && echo exit-code: $?

All top-level dependencies are up-to-date.
exit-code: 0

hook sync

Wrapper for poetry install --sync command.

With --exit option, the command returns the corresponding value as exit code. With it's default --exit=any the sum of installs, updates and removals is returned.

$ poetry hook sync --dry-run && echo exit-code: $?

No dependencies to install or update.
exit-code: 0

Dependencies

PyPI - cleo PyPI - poetry


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poetry_plugin_hook-1.0.0.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

poetry_plugin_hook-1.0.0-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page