Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasthiebaud/poetry-githooks
Simple git hooks with poetry
https://github.com/thomasthiebaud/poetry-githooks
git githooks poetry python python-3
Last synced: 3 months ago
JSON representation
Simple git hooks with poetry
- Host: GitHub
- URL: https://github.com/thomasthiebaud/poetry-githooks
- Owner: thomasthiebaud
- License: mit
- Created: 2020-04-27T16:53:52.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-21T20:11:44.000Z (about 1 year ago)
- Last Synced: 2024-04-24T12:25:40.703Z (9 months ago)
- Topics: git, githooks, poetry, python, python-3
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# poetry-githooks
## Install
This repository is made to work with [poetry](https://python-poetry.org/). 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]`