GeezerVison is showing github.com — ignore autoupdate for specific hook/s · Issue #1959 · pre-commit/pre-commit
ignore autoupdate for specific hook/s #1959DescriptionTake it as RFE or question
Recently, mypi latest version creating problems for my projects. I want to avoid mypi hook in autoupdate.
Do we have anything which helps me to ignore just a specific hook and allow auto update for all other hooks as per YAML?
I think we can add one tag in yaml like autoupdate=false default pre-commit will consider autoupdate=true for all hooks. Activitydigitronik commented on Jul 1, 2021 asottile commented on Jul 1, 2021 if you don't want to auto update then don't run auto update
you can use --repo to update individual repositories digitronik commented on Jul 1, 2021 I think, I failed to explain importance. @asottile think about bot sending PR/MR to n number of projects and user just don't want update for specific hook/repo. asottile commented on Jul 1, 2021 you need to upgrade at some point digitronik commented on Jul 1, 2021 Exactly, but sometimes project want to support like in my case py36 and mypi latest version creating problem. We need to take hard decision on this but need some time as ecosystem 😃.
If pre-commit provide option to ignore autoupdate for specific hook just like pinning version then it will give freedom to users.
It's just my opinion/Idea. asottile commented on Jul 1, 2021 I'm using latest mypy (you're spelling it wrong) with py36 just fine digitronik commented on Jul 1, 2021 My bad. In mypy doc they provided awesome note.
Users need to fix it but definitely need some time.
Starting in mypy 0.900, most third-party package stubs must be installed explicitly. This decouples mypy and stub versioning, allowing stubs to updated without updating mypy. This also allows stubs not originally included with mypy to be installed. Earlier mypy versions included a fixed set of stubs for third-party packages.
asottile commented on Jul 1, 2021 Reacted by NIKHIL DHANDRE digitronik commented on Jul 1, 2021 Woot... intresting definitely this will solve problem 🙌. I would like to apply this with TODO note.
Thanks! ssbarnea commented on Dec 9, 2021 I think that the ability to disable autoupdate for a specific hook entry is needed as I recently faced one such case with https://github.com/ansible/ansible-navigator/blob/main/.pre-commit-config.yaml#L224-L235
This repo has 15+ repos to update but one of the hooks cannot be updated because ones of flake8 extensions does not support flake 4.0 yet and I suspect it may take even 6 months for it to be updated. Updating ~15 hook versions by hand is no joy.
What is even more interesting is that --repo would not be usable in this case because we list flake8 twice, once as normal hook and once as manual, with a slightly different setup. One of them is safe to auto-update, the other one is not. Reacted by Ruairidh MacLeod asottile commented on Dec 9, 2021 sorry but as above:
if you don't want to auto update then don't run auto update
locked as resolved and limited conversation to collaborators on Dec 9, 2021
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|