eshwen / pyproject-version-sync

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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!)

About

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


Languages

Language:Python 100.0%