poetry-pre-commit-plugin
raw JSON → 0.2.2 verified Sat May 09 auth: no python
A Poetry plugin that automatically installs pre-commit hooks when they are added to a project. Current version: 0.2.2, compatible with Poetry 2.0.0+. Released occasionally, with maintenance focused on compatibility.
pip install poetry-pre-commit-plugin Common errors
error ModuleNotFoundError: No module named 'poetry_pre_commit_plugin' ↓
cause Plugin not installed in the same environment as Poetry.
fix
Install with
pip install poetry-pre-commit-plugin in the same Python environment where Poetry is installed. error The POETRY_REQUESTS_CA_BUNDLE environment variable is set... (or similar SSL issues) ↓
cause Plugin triggers pre-commit which may require network access; SSL certificates not found.
fix
Set
REQUESTS_CA_BUNDLE or SSL_CERT_FILE to a valid CA bundle, or use pre-commit install manually. Warnings
gotcha Plugin runs on every `poetry install` or `poetry add`, which may be unexpected if you have many subdependencies. ↓
fix To disable temporarily, run `POETRY_PRE_COMMIT_SKIP=1 poetry install`.
gotcha The plugin only works inside a Poetry project. Running outside a project directory will cause errors. ↓
fix Upgrade to 0.1.2+ where it gracefully skips.
breaking Poetry 2.0.0 changed event system; older versions of the plugin (<0.2.0) are incompatible. ↓
fix Upgrade to >=0.2.0.
deprecated The plugin may not be actively maintained; check for updates. ↓
fix Consider using pre-commit directly or other alternatives if issues arise.
Imports
- PoetryPreCommitPlugin
from poetry_pre_commit_plugin.plugin import PoetryPreCommitPlugin
Quickstart
# Install the plugin system-wide or in your Poetry environment
# Then, in your project, ensure pre-commit is configured (.pre-commit-config.yaml)
# Run: poetry install
# The plugin will automatically run pre-commit install if hooks are present.
# No additional code needed.