From b404fb367227a9ec8e8d5b2e2e3675fefb3abdfb Mon Sep 17 00:00:00 2001 From: umkay Date: Mon, 22 May 2017 10:51:27 -0700 Subject: [PATCH] mypy: Change type annotation from union to explicit set --- bots/zephyr_mirror_backend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index cbb6c8a..8ffe9ae 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -902,13 +902,13 @@ def valid_stream_name(name): return name != "" def parse_zephyr_subs(verbose=False): - # type: (bool) -> Union[List, Tuple, Set[Tuple[str, str, str]]] - zephyr_subscriptions = set() + # type: (bool) -> Set[Tuple[str, str, str]] + zephyr_subscriptions = set() # type: Set[Tuple[str, str, str]] subs_file = os.path.join(os.environ["HOME"], ".zephyr.subs") if not os.path.exists(subs_file): if verbose: logger.error("Couldn't find ~/.zephyr.subs!") - return [] + return zephyr_subscriptions for line in open(subs_file, "r").readlines(): line = line.strip()