Skip to main content

A fork of the pre-commit framework (https://github.com/pre-commit/pre-commit) that allows modifications and non-zero return codes

Project description

build status pre-commit.ci status

Attention !

This version is a little patch do to modification during pre-commit. Because you're not child and assume the consequence.

/!\ It's just a really quick hack. there is no safeguard nor configuration by hook. Can add option if some people is interested. In this case I'll do an Autopatch CI to build from the upstream repo and stay up to date. I do not change the name of the package builded so it replace the initial one.

Installation

there is no release for now

  • install with
pip install git+https://github.com/ethan-0l/pre-commit-pegi18.git

or git local

git clone https://github.com/ethan-0l/pre-commit-pegi18.git
cd pre-commit-pegi18
pip install .

poetry :

poetry add git+https://github.com/ethan-0l/pre-commit-pegi18.git

Use

  • Add allow_modifications: true to hook
  • Add allow_return_nzero: true to hook <- use with more caution
  • Add allow_return_codes: [1,2,3.....,42,...] <- 0 is always allowed. Usefull for hook that has proper handling of failure vs modification.

.pre-commit-config.yaml

  - repo: https....
    rev: v3.14.2
    hooks:
      - id: ...
        args: []
        stages:
          - pre-commit
        allow_modifications: true

ou set PRE_COMMIT_ALLOW_MODIFICATIONS a true

$env:PRE_COMMIT_ALLOW_MODIFICATIONS="true"
export PRE_COMMIT_ALLOW_MODIFICATIONS=true

also available : PRE_COMMIT_ALLOW_RETURN_NZERO

pre-commit

A framework for managing and maintaining multi-language pre-commit hooks.

For more information see: https://pre-commit.com/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pre_commit_pegi18-4.0.1.tar.gz (195.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pre_commit_pegi18-4.0.1-py2.py3-none-any.whl (222.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pre_commit_pegi18-4.0.1.tar.gz.

File metadata

  • Download URL: pre_commit_pegi18-4.0.1.tar.gz
  • Upload date:
  • Size: 195.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for pre_commit_pegi18-4.0.1.tar.gz
Algorithm Hash digest
SHA256 528502960bb2138e24a2287d52fe4994a6755b47078a74aba44b9b4604e16345
MD5 7a5693a2c427a914f07f3d81ba3f0a0f
BLAKE2b-256 6e652ab96be8cee509721df1726121e5ad665db9019b869ac9fdf6297211284b

See more details on using hashes here.

File details

Details for the file pre_commit_pegi18-4.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pre_commit_pegi18-4.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2bbba560aea943bb20651fe6108747a1c7d68a4eb82e0886b0f9148852913b7
MD5 e7f319b1b5b230d289231628f75b6f15
BLAKE2b-256 db38eee87b50baadde1a317413ce695bab60c69e02e5c8199c12fc92423f9dc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page