fix hostmask_match_many type hinting

This commit is contained in:
jesopo 2019-06-20 17:58:49 +01:00
parent c65a422284
commit 01ddc04bb9

View file

@ -330,7 +330,8 @@ class BatchType(object):
t = list(set([type])&self._names) t = list(set([type])&self._names)
return t[0] if t else None return t[0] if t else None
def hostmask_match_many(hostmasks: typing.List[str], pattern: str) -> str: def hostmask_match_many(hostmasks: typing.List[str], pattern: str
) -> typing.Optional[str]:
part1_out = [] part1_out = []
for part1 in pattern.split("?"): for part1 in pattern.split("?"):
part2_out = [] part2_out = []