diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-04 07:22:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-04 07:22:18 +0000 |
commit | 58a809aa43ae21566be4613eb42ac56faf54f901 (patch) | |
tree | 371b9cc8a265cbabea4b12e5508b8bde6edf0b89 /pre_commit/clientlib.py | |
parent | Adding upstream version 2.20.0. (diff) | |
download | pre-commit-58a809aa43ae21566be4613eb42ac56faf54f901.tar.xz pre-commit-58a809aa43ae21566be4613eb42ac56faf54f901.zip |
Adding upstream version 2.21.0.upstream/2.21.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/clientlib.py')
-rw-r--r-- | pre_commit/clientlib.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pre_commit/clientlib.py b/pre_commit/clientlib.py index 9b53e81..da6ca2b 100644 --- a/pre_commit/clientlib.py +++ b/pre_commit/clientlib.py @@ -298,6 +298,14 @@ CONFIG_HOOK_DICT = cfgv.Map( OptionalSensibleRegexAtHook('files', cfgv.check_string), OptionalSensibleRegexAtHook('exclude', cfgv.check_string), ) +LOCAL_HOOK_DICT = cfgv.Map( + 'Hook', 'id', + + *MANIFEST_HOOK_DICT.items, + + OptionalSensibleRegexAtHook('files', cfgv.check_string), + OptionalSensibleRegexAtHook('exclude', cfgv.check_string), +) CONFIG_REPO_DICT = cfgv.Map( 'Repository', 'repo', @@ -308,7 +316,7 @@ CONFIG_REPO_DICT = cfgv.Map( 'repo', cfgv.NotIn(LOCAL, META), ), cfgv.ConditionalRecurse( - 'hooks', cfgv.Array(MANIFEST_HOOK_DICT), + 'hooks', cfgv.Array(LOCAL_HOOK_DICT), 'repo', LOCAL, ), cfgv.ConditionalRecurse( |