mypy: Add --disallow-any=generics & extend typing accordingly.
Also reset typing of ExternalBotHandler to Any after discussion.
This commit is contained in:
parent
424a4bb631
commit
28687f18ca
10 changed files with 54 additions and 51 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue