summaryrefslogtreecommitdiffstats
path: root/pre_commit/meta_hooks
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/meta_hooks
parentAdding upstream version 2.8.2. (diff)
downloadpre-commit-upstream/2.9.3.tar.xz
pre-commit-upstream/2.9.3.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/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(