Last active
November 21, 2019 18:00
-
-
Save jaysonsantos/c9d312f6b584c763f338cf1eab50b697 to your computer and use it in GitHub Desktop.
Example hook for pre-commit to check if poetry file is locked
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- repo: local | |
hooks: | |
- id: poetry_lock | |
name: Check if poetry is updated | |
entry: python -c "from poetry.poetry import Poetry; | |
assert Poetry.create('.').locker.is_fresh(), 'Poetry is not locked'" | |
language: python_venv | |
additional_dependencies: | |
- poetry | |
verbose: True | |
files: pyproject.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment