Skip to main content

Simple git hooks with poetry

Project description

poetry-githooks

Install

This repository is made to work with poetry. Assuming you have a working poetry setup, run

poetry add -D poetry-githooks

Install

Create a tool.githooks section in your pyproject.toml file and define your git hooks, for example

[tool.githooks]
pre-commit = "black ."

then run

poetry run githooks setup

That's it :tada: your hooks will be ran using poetry when expected

IMPORTANT You need to rerun poetry run githooks setup everytime you change [tool.githooks]

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_githooks-3.0.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

poetry_githooks-3.0.1-py3-none-any.whl (5.4 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