Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Diaoul/pre-commit-hooks-poetry

Repository files navigation

pre-commit-hooks-poetry

My personnal poetry-related pre-commit hooks

poetry-export - DEPRECATED

Prevent desync between poetry and requirements.txt.

DEPRECATION NOTICE: See python-poetry/poetry#2457 for better implementations.

Usage:

  - repo: https://github.com/Diaoul/pre-commit-hooks-poetry
    rev: 0.5.0
    hooks:
      - id: poetry-export

All arguments to the poetry export command are valid:

  - repo: https://github.com/Diaoul/pre-commit-hooks-poetry
    rev: 0.5.0
    hooks:
      - id: poetry-export
        args: ["--without-hashes"]

For a another file:

  - repo: https://github.com/Diaoul/pre-commit-hooks-poetry
    rev: 0.5.0
    hooks:
      - id: poetry-export
        args: ["--dev"]
        files: ^dev-requirements\.txt$