Skip to main content

Freeze transitive pre-commit dependencies in Python hooks.

Project description

freeze-transitive

Setup

Add the freeze-transitive hook to you pre-commit configuration.

repos:
  # Add freeze-transitive to the end of repos, it's important it's the last repository
  # as environments for previous hooks must be setup before it runs.
  - repo: https://github.com/antonagestam/freeze-transitive
    # rev: ...
    hooks:
      - id: freeze-transitive

Copy your pre-commit configuration to a template file. From now on .pre-commit-hooks.yaml acts as a lockfile and you should make no manual edits to it, instead make edits in .pre-commit-template.yaml. Both files should be checked into version control.

$ cp .pre-commit-hooks.yaml .pre-commit-template.yaml

Now run pre-commit and verify it has updated .pre-commit-hooks.yaml with all transitive dependencies pinned.

$ pre-commit run --all-files

To run autoupdate, you need to point pre-commit at the template file.

$ pre-commit autoupdate --config=.pre-commit-template.yaml

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

freeze-transitive-0.0.0a0.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

freeze_transitive-0.0.0a0-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

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