Skip to content

New hook? uv-update-requirements #48

@pjrulez

Description

@pjrulez

Why not have a hook that can export old school requirements.txt and update the legacy requirements.txt without interrupting git commit?

I wanted to achieve similar with uv-export hook, but it was not possible to do this.

-   repo: local
    hooks:
    - id: update-requirements
      name: Update requirements.txt
      entry: bash -c 'uv pip freeze > requirements.txt' # EDITED OUT && git add requirements.txt # 
      language: system
      types: [file]
      files: \.(json|py|toml)
      stages: [pre-commit]

Thought it'd be a legit addition.

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