Skip to content

Temporarily skipping the installation of a hook and falling back to an installed version #3547

@ltfish

Description

@ltfish

search you tried in the issue tracker

skip; skip install; skip installation

describe your actual problem

Sometimes I work in environments where I do not have good enough Internet connection or enough bandwidth, installing new versions of some hooks (e.g., ruff or pyright) may simply be impossible. I wish there was an option that allows pre-commit to skip the installation of all hooks and falls back to an existing installed version of all missing hooks. I do not want to completely disable the hooks because they are still useful and running old versions are oftentimes as good as running new versions (plus our CI runs the latest versions regardless).

This feature is useful for people working on airplanes or trains without Starlink. I understand that the use case is niche, so I can implement it if you think it's a useful addition to pre-commit.

pre-commit --version

pre-commit 4.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions