mypy: Clarify type hints in zulip/integrations/.
MODIFY
zulip/integrations/codebase/zulip_codebase_mirror
zulip/integrations/codebase/zulip_codebase_mirror
@@ -63,7 +63,7 @@ def make_api_call(path):
"Content-Type": "application/json",
"Accept": "application/json"})
if response.status_code == 200:
- return json.loads(response.text)
+ return json.loads(response.text) # type: ignore # dynamic import
if response.status_code >= 500:
logging.error(str(response.status_code))

MODIFY
zulip/integrations/jabber/jabber_mirror_backend.py
zulip/integrations/jabber/jabber_mirror_backend.py
# | other sender| x | | |
# public mode +-------------+-----+----+--------+----
# | self sender | | | |
-from typing import Dict, List, Set
+from typing import Dict, List, Set, Optional
import logging
import threading
@@ -216,7 +216,7 @@ class ZulipToJabberBot(object):
def __init__(self, zulip_client):
# type: (Client) -> None
self.client = zulip_client
- self.jabber = None
+ self.jabber = None # type: Optional[JabberToZulipBot]
def set_jabber_client(self, client):
# type: (JabberToZulipBot) -> None

MODIFY
zulip/integrations/zephyr/zephyr_mirror_backend.py
zulip/integrations/zephyr/zephyr_mirror_backend.py
@@ -341,7 +341,7 @@ def decrypt_zephyr(zephyr_class, instance, body):
return decrypted
def process_notice(notice, log):
- # type: (zulip, Optional[IO[Any]]) -> None
+ # type: (Any, Optional[IO[Any]]) -> None
(zsig, body) = parse_zephyr_body(notice.message, notice.format)
is_personal = False
is_huddle = False

mypy: Clarify type hints in zulip/integrations/.