We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mypy
1 parent 0d8cd96 commit cbe3dd6Copy full SHA for cbe3dd6
sync_pre_commit_deps.py
@@ -1,11 +1,12 @@
1
from __future__ import annotations
2
3
import argparse
4
+import re
5
from collections.abc import Sequence
6
7
import ruamel.yaml
8
-SUPPORTED = frozenset(('black', 'flake8'))
9
+SUPPORTED = frozenset(('black', 'flake8', 'mypy'))
10
11
12
_ARGUMENT_HELP_TEMPLATE = (
@@ -55,7 +56,8 @@ def main(argv: Sequence[str] | None = None) -> int:
55
56
for repo in loaded['repos']:
57
for hook in repo['hooks']:
58
if (hid := hook['id']) in SUPPORTED:
- versions[hid] = repo['rev']
59
+ if hook_rev := re.match(r'[vV]?(?P<rev>[.\d]+)$', repo['rev']):
60
+ versions[hid] = hook_rev.group('rev')
61
62
updated = []
63
0 commit comments