mypy: Added Dict, List and Set imports.
Fixed mypy errors associated with the upgrade.
MODIFY
bots/irc-mirror.py
bots/irc-mirror.py
@@ -14,7 +14,7 @@ import zulip
import optparse
if False:
- from typing import Any
+ from typing import Any, Dict
IRC_DOMAIN = "irc.example.com"

MODIFY
bots/jabber_mirror_backend.py
bots/jabber_mirror_backend.py
# | other sender| x | | |
# public mode +-------------+-----+----+--------+----
# | self sender | | | |
-from typing import Set
+from typing import Dict, List, Set
import logging
import threading

MODIFY
bots/log2zulip
bots/log2zulip
@@ -22,6 +22,7 @@ import ujson
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../api"))
import zulip
+from typing import List
lock_path = "/var/tmp/log2zulip.lock"
control_path = "/etc/log2zulip.conf"

MODIFY
bots/zephyr_mirror_backend.py
bots/zephyr_mirror_backend.py
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from __future__ import absolute_import
-from typing import IO, Any, Text, Union, Set, Tuple
+from typing import IO, Any, Dict, List, Text, Union, Set, Tuple
from types import FrameType
import sys

MODIFY
integrations/openshift/post_deploy
integrations/openshift/post_deploy
import os
import subprocess
import sys
+from typing import Dict
sys.path.insert(0, os.path.dirname(__file__))
import zulip_openshift_config as config

MODIFY
integrations/openshift/zulip_openshift_config.py
integrations/openshift/zulip_openshift_config.py
# THE SOFTWARE.
# https://github.com/python/mypy/issues/1141
-from typing import Text
+from typing import Dict, Text
# Change these values to configure authentication for the plugin
ZULIP_USER = 'openshift-bot@example.com'

MODIFY
integrations/trac/zulip_trac.py
integrations/trac/zulip_trac.py
@@ -43,7 +43,7 @@ import zulip_trac_config as config
VERSION = "0.9"
if False:
- from typing import Any
+ from typing import Any, Dict
if config.ZULIP_API_PATH is not None:
sys.path.append(config.ZULIP_API_PATH)

MODIFY
setup.py
setup.py
from __future__ import print_function
if False:
- from typing import Any, Generator, List, Tuple
+ from typing import Any, Dict, Generator, List, Tuple
import os
import sys

MODIFY
zulip/__init__.py
zulip/__init__.py
@@ -38,7 +38,7 @@ from six.moves.configparser import SafeConfigParser
from six.moves import urllib
import logging
import six
-from typing import Any, Callable, Dict, Iterable, IO, Mapping, Optional, Text, Tuple, Union
+from typing import Any, Callable, Dict, Iterable, IO, List, Mapping, Optional, Text, Tuple, Union
__version__ = "0.2.5"

mypy: Added Dict, List and Set imports.

Fixed mypy errors associated with the upgrade.