1
0
Fork 0

Merging upstream version 4.0.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:51:43 +01:00
parent 06469805a5
commit 0b6981c15c
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
44 changed files with 596 additions and 105 deletions

View file

@ -61,7 +61,7 @@ def filter_by_include_exclude(
names: Iterable[str],
include: str,
exclude: str,
) -> Generator[str, None, None]:
) -> Generator[str]:
include_re, exclude_re = re.compile(include), re.compile(exclude)
return (
filename for filename in names
@ -84,7 +84,7 @@ class Classifier:
types: Iterable[str],
types_or: Iterable[str],
exclude_types: Iterable[str],
) -> Generator[str, None, None]:
) -> Generator[str]:
types = frozenset(types)
types_or = frozenset(types_or)
exclude_types = frozenset(exclude_types)
@ -97,7 +97,7 @@ class Classifier:
):
yield filename
def filenames_for_hook(self, hook: Hook) -> Generator[str, None, None]:
def filenames_for_hook(self, hook: Hook) -> Generator[str]:
return self.by_types(
filter_by_include_exclude(
self.filenames,