Skip to content

Instantly share code, notes, and snippets.

@jaysonsantos
Last active November 21, 2019 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaysonsantos/c9d312f6b584c763f338cf1eab50b697 to your computer and use it in GitHub Desktop.
Save jaysonsantos/c9d312f6b584c763f338cf1eab50b697 to your computer and use it in GitHub Desktop.
Example hook for pre-commit to check if poetry file is locked
- 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