sync-pre-commit-lock icon indicating copy to clipboard operation
sync-pre-commit-lock copied to clipboard

Add ability to update versions in `mypy` hook's `additional_dependencies`

Open macintacos opened this issue 1 year ago • 1 comments

This plugin is great, thanks for making it!

One thing that would put it over the top for me would be to add the ability to update mypy's additional_dependencies array to match the versions in the lock file as well. Any chance this could be something that is added to this plugin? It feels like a natural extension of this project.

macintacos avatar Mar 04 '24 04:03 macintacos

Hey @macintacos!

This is indeed a natural extension of the project, and was already an area of improvement.

For a first version, I think I'll just go through additional_dependencies of all hooks, and update all requirements to be the exact pinned version of the package. In the future, we may want to map PDM/Poetry dependency group to a hook's additional_dependencies, so that addition and deletion of packages are handled as well.

I don't use the mypy hook or additional_dependencies, would you mind sharing one of your configuration as a test case?

GabDug avatar Mar 24 '24 10:03 GabDug