summaryrefslogtreecommitdiffstats
path: root/pre_commit/meta_hooks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-27 16:04:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-27 16:04:26 +0000
commit7ad3acc8faa151e307c82b659f884205ef47012b (patch)
treeda74df356ea350b3ee9fb0bf71937e0bdb7896a6 /pre_commit/meta_hooks
parentReleasing debian version 2.8.2-1. (diff)
downloadpre-commit-7ad3acc8faa151e307c82b659f884205ef47012b.tar.xz
pre-commit-7ad3acc8faa151e307c82b659f884205ef47012b.zip
Merging upstream version 2.9.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/meta_hooks')
-rw-r--r--pre_commit/meta_hooks/check_useless_excludes.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pre_commit/meta_hooks/check_useless_excludes.py b/pre_commit/meta_hooks/check_useless_excludes.py
index db6865c..12be03f 100644
--- a/pre_commit/meta_hooks/check_useless_excludes.py
+++ b/pre_commit/meta_hooks/check_useless_excludes.py
@@ -47,8 +47,10 @@ def check_useless_excludes(config_file: str) -> int:
# the defaults applied during runtime
hook = apply_defaults(hook, MANIFEST_HOOK_DICT)
names = classifier.filenames
- types, exclude_types = hook['types'], hook['exclude_types']
- names = classifier.by_types(names, types, exclude_types)
+ types = hook['types']
+ types_or = hook['types_or']
+ exclude_types = hook['exclude_types']
+ names = classifier.by_types(names, types, types_or, exclude_types)
include, exclude = hook['files'], hook['exclude']
if not exclude_matches_any(names, include, exclude):
print(