GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ignore autoupdate for specific hook/s · Issue #1959 · pre-commit/pre-commit

ignore autoupdate for specific hook/s #1959

New issue
Copy link
New issue
Copy link
Closed
Closed
ignore autoupdate for specific hook/s#1959
Copy link
Labels
question

Description

@digitronik
digitronik
opened on Jul 1, 2021
Issue body actions

Take 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.

Reacted by Sorin Sbarnea

Activity

  1. digitronik commented on Jul 1, 2021

    @digitronik
    digitronik
    on Jul 1, 2021
    Author
    More actions

    @asottile please help me with this ^^

  2. asottile commented on Jul 1, 2021

    @asottile
    asottile
    on Jul 1, 2021
    Member
    More actions

    if you don't want to auto update then don't run auto update

    you can use --repo to update individual repositories

  3. asottile
    closed this as completedon Jul 1, 2021
  4. asottile
    added
    question
    on Jul 1, 2021
  5. digitronik commented on Jul 1, 2021

    @digitronik
    digitronik
    on Jul 1, 2021
    Author
    More actions

    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.

  6. asottile commented on Jul 1, 2021

    @asottile
    asottile
    on Jul 1, 2021
    Member
    More actions

    you need to upgrade at some point

  7. digitronik commented on Jul 1, 2021

    @digitronik
    digitronik
    on Jul 1, 2021
    Author
    More actions

    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.

  8. asottile commented on Jul 1, 2021

    @asottile
    asottile
    on Jul 1, 2021
    Member
    More actions

    I'm using latest mypy (you're spelling it wrong) with py36 just fine

  9. digitronik commented on Jul 1, 2021

    @digitronik
    digitronik
    on Jul 1, 2021
    Author
    More actions

    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.

  10. asottile commented on Jul 1, 2021

    @asottile
    asottile
    on Jul 1, 2021
    Member
    More actions

    that has nothing to do with python3.6 and if you want to restore all of typeshed without thinking about it see https://github.com/asottile/types-all

    Reacted by NIKHIL DHANDRE
  11. digitronik commented on Jul 1, 2021

    @digitronik
    digitronik
    on Jul 1, 2021
    Author
    More actions

    Woot... intresting definitely this will solve problem 🙌. I would like to apply this with TODO note.
    Thanks!

  12. ssbarnea commented on Dec 9, 2021

    @ssbarnea
    ssbarnea
    on Dec 9, 2021
    More actions

    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
  13. asottile commented on Dec 9, 2021

    @asottile
    asottile
    on Dec 9, 2021
    Member
    More actions

    sorry but as above:

    if you don't want to auto update then don't run auto update

  14. pre-commit
    locked as resolved and limited conversation to collaborators on Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.