Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.33 KB

README.md

File metadata and controls

41 lines (28 loc) · 1.33 KB

pyproject-version-sync

Python 3.10 Poetry pre-commit

Pre-commit hook to sync the pyproject.toml version to the latest tag in the repo.

Usage

To flag whether the latest tag in the repo matches the version in the pyproject.toml file, add the following to your .pre-commit-config.yaml:

  - repo: https://github.com/eshwen/pyproject-version-sync
    rev: v0.2.1
    hooks:
      - id: pyproject-version-sync

Or, to enable autofix:

  - repo: https://github.com/eshwen/pyproject-version-sync
    rev: v0.2.1
    hooks:
      - id: pyproject-version-sync
        args: [--fix]

Examples

With the default arguments:

default

With autofix:

fix

(Styling shamelessly nicked from https://github.com/ines/termynal. Check out that repo for cool terminal animations!)