summaryrefslogtreecommitdiffstats
path: root/pre_commit/commands/autoupdate.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-27 16:04:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-27 16:04:10 +0000
commita971f38b11f5955f6ea4f7922233d8324a5c6753 (patch)
tree5a424740e9cee97bc1c8053fea07db935c27b659 /pre_commit/commands/autoupdate.py
parentAdding upstream version 2.8.2. (diff)
downloadpre-commit-fd52b5c446587e29f9bcb1dfdb6f6df66a3657b2.tar.xz
pre-commit-fd52b5c446587e29f9bcb1dfdb6f6df66a3657b2.zip
Adding upstream version 2.9.3.upstream/2.9.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/commands/autoupdate.py')
-rw-r--r--pre_commit/commands/autoupdate.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py
index 87f6d53..33a3473 100644
--- a/pre_commit/commands/autoupdate.py
+++ b/pre_commit/commands/autoupdate.py
@@ -79,14 +79,12 @@ def _check_hooks_still_exist_at_rev(
hooks_missing = hooks - {hook['id'] for hook in manifest}
if hooks_missing:
raise RepositoryCannotBeUpdatedError(
- f'Cannot update because the tip of HEAD is missing these hooks:\n'
- f'{", ".join(sorted(hooks_missing))}',
+ f'Cannot update because the update target is missing these '
+ f'hooks:\n{", ".join(sorted(hooks_missing))}',
)
-REV_LINE_RE = re.compile(
- r'^(\s+)rev:(\s*)([\'"]?)([^\s#]+)(.*)(\r?\n)$', re.DOTALL,
-)
+REV_LINE_RE = re.compile(r'^(\s+)rev:(\s*)([\'"]?)([^\s#]+)(.*)(\r?\n)$')
def _original_lines(