Skip to main content

sync-pre-commit-deps

Sync pre-commit hook dependencies based on other installed hooks

install (standalone)

pip install sync-pre-commit-deps

install as a pre-commit hook (recommended)

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/pre-commit/sync-pre-commit-deps
    rev: v0.0.5
    hooks:
    -   id: sync-pre-commit-deps

cli

$ sync-pre-commit-deps path/to/.pre-commit-config.yaml

what it does

Hooks like black, yesqa, and eslint reference additional dependencies which are also pre-commit hooks. This tool syncs the version in additional_dependencies with the version in rev.

For example, flake8 under yesqa is updated from 5.0.0 to 6.0.0 because the flake8 hook uses 6.0.0:

 repos:
 -   repo: https://github.com/PyCQA/flake8
     rev: 6.0.0
     hooks:
     -   id: flake8
 -   repo: https://github.com/asottile/yesqa
     rev: v1.5.0
     hooks:
     -   id: yesqa
         additional_dependencies:
-        -   flake8==5.0.0
+        -   flake8==6.0.0

Another example, the eslint version in additional_dependencies is updated to match the version in rev:

 -   repo: https://github.com/pre-commit/mirrors-eslint
     rev: v4.15.0
     hooks:
     -   id: eslint
         additional_dependencies:
-        -   eslint@4.14.0
+        -   eslint@4.15.0
         -   eslint-config-google@0.7.1
         -   eslint-loader@1.6.1
         -   eslint-plugin-react@6.10.3
         -   babel-eslint@6.1.2

what it doesn't do

  • Does not add new additional dependencies. Only updates versions for dependencies that are already specified.
  • Does not sync versions from package.json, requirements.txt, pyproject.toml, etc.

Download files

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

Source Distribution

sync_pre_commit_deps-0.0.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

sync_pre_commit_deps-0.0.5-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sync_pre_commit_deps-0.0.5.tar.gz.

File metadata

  • Download URL: sync_pre_commit_deps-0.0.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for sync_pre_commit_deps-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ffa94f7f185b6f70bf5104d1dcd13a54c3c0fb2a655a743fadc32633703abf82
MD5 99c7d2f760cdd17dee8222586c89e34a
BLAKE2b-256 dcd7c0bb71db2fb2b760903f1361dff72ebc4ae168650913a363eb12f476339c

See more details on using hashes here.

File details

Details for the file sync_pre_commit_deps-0.0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sync_pre_commit_deps-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8f33e2bdda9d197aacad546bb3788fa0de76f8c7cc4babbf4d38485a8bdca36b
MD5 f211e5a16cf08ab04c38c5cd873fceff
BLAKE2b-256 8be8b2f79112567468ce6cf6a04fe6c491a39107b1e39c54ab53b7ee3ce08cb9

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