Skip to content

Support synchronizing additional-dependencies #51

Description

@lachaib

Hi,

I have come across issue #29 so I know there's a workaround already proposed, however I'd like to give a fresher use case. The one of mypy.

Currently, I'm running mypy from local because it's the only way I can get the additional types in the version they are tested with.
However it's rather verbose and maybe error prone with regards to the ecosystem's evolution.

      - id: mypy
        name: mypy
        entry: uv run mypy
        language: python
        pass_filenames: true
        types_or: [python, pyi]

What I'd like is to use the proper hook mirrors-mypy to simplify the writing of my hook

   -   repo: https://github.com/pre-commit/mirrors-mypy
       rev: v2.1.0
       hooks:
         - id: mypy
           additional_dependencies:
             - types-redis==4.6.0.20241004
             - types-pyyaml==6.0.12.20260518

Using sync-with-uv to sync additional_dependencies would be a real win to ensure the pre-commit is inline with what a developer gets and what CI will return, without having to recode the types_or and other fancy things I need to get it to work from "local" repository.

If you can accept it as a valuable addition I'd be glad to work on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions