Use this pre-commit hook to ensure that the requirement output is stage for commit when you use a Poetry to manage packages and add new dependencies.
pre-commit: https://github.com/pre-commit/pre-commit
- python3.6 or later
- Support all arguments of poetry export command
Add hooks in your .pre-commit-config.yaml
- repo: https://github.com/ehx/poetry-export-requirements
rev: master
hooks:
- id: export-requirements # Export dependencies
- id: export-requirements-dev # Export dev-dependencies without hashes
args: [--without-hashes]
--without-output: Don't check that requirements output isn't staged in commit