mypy: Added Dict, List and Set imports.

Fixed mypy errors associated with the upgrade.
This commit is contained in:
Raghav Jajodia 2017-03-03 23:31:52 +05:30 committed by Tim Abbott
parent 94871fea76
commit 58f5e729b6
9 changed files with 9 additions and 7 deletions

View file

@ -14,7 +14,7 @@ import zulip
import optparse
if False:
from typing import Any
from typing import Any, Dict
IRC_DOMAIN = "irc.example.com"

View file

@ -37,7 +37,7 @@
# | other sender| x | | |
# public mode +-------------+-----+----+--------+----
# | self sender | | | |
from typing import Set
from typing import Dict, List, Set
import logging
import threading

View file

@ -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"

View file

@ -21,7 +21,7 @@
# 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

View file

@ -25,6 +25,7 @@
import os
import subprocess
import sys
from typing import Dict
sys.path.insert(0, os.path.dirname(__file__))
import zulip_openshift_config as config

View file

@ -21,7 +21,7 @@
# 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'

View file

@ -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)

View file

@ -3,7 +3,7 @@
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

View file

@ -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"