fix hostmask_match_many typehint

This commit is contained in:
jesopo 2020-01-22 15:04:48 +00:00
parent ade5cbb1f3
commit f79aa036f2

View file

@ -284,7 +284,7 @@ def hostmask_parse(hostmask: str):
return HostmaskPattern(hostmask, re.compile(".".join(part1_out)))
def hostmask_match_many(hostmasks: typing.List[str], pattern: HostmaskPattern,
) -> typing.Optional[str]:
) -> typing.Generator[str, None, None]:
for hostmask in hostmasks:
if pattern.match(hostmask):
yield hostmask