mypy: Add --disallow-any=generics & extend typing accordingly.

Also reset typing of ExternalBotHandler to Any after discussion.
This commit is contained in:
neiljp (Neil Pilgrim) 2017-12-11 13:30:47 -08:00 committed by showell
parent 424a4bb631
commit 28687f18ca
10 changed files with 54 additions and 51 deletions

View file

@ -301,10 +301,10 @@ class ZulipToJabberBot(object):
def get_rooms(zulipToJabber):
# type: (ZulipToJabberBot) -> List[str]
def get_stream_infos(key, method):
# type: (str, Callable) -> Any
# type: (str, Callable[[], Dict[str, Any]]) -> Any
ret = method()
if ret.get("result") != "success":
logging.error(ret)
logging.error(str(ret))
sys.exit("Could not get initial list of Zulip %s" % (key,))
return ret[key]