MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / _update_one

Function _update_one

pre_commit/commands/autoupdate.py:103–113  ·  view source on GitHub ↗
(
        i: int,
        repo: dict[str, Any],
        *,
        tags_only: bool,
        freeze: bool,
)

Source from the content-addressed store, hash-verified

101
102
103def _update_one(
104 i: int,
105 repo: dict[str, Any],
106 *,
107 tags_only: bool,
108 freeze: bool,
109) -> tuple[int, RevInfo, RevInfo]:
110 old = RevInfo.from_config(repo)
111 new = old.update(tags_only=tags_only, freeze=freeze)
112 _check_hooks_still_exist_at_rev(repo, new)
113 return i, old, new
114
115
116REV_LINE_RE = re.compile(r'^(\s+)rev:(\s*)([\'"]?)([^\s#]+)(.*)(\r?\n)$')

Callers

nothing calls this directly

Calls 3

updateMethod · 0.80
from_configMethod · 0.45

Tested by

no test coverage detected