mypy: Added Dict, List and Set imports.
Fixed mypy errors associated with the upgrade.
This commit is contained in:
parent
94871fea76
commit
58f5e729b6
|
@ -14,7 +14,7 @@ import zulip
|
||||||
import optparse
|
import optparse
|
||||||
|
|
||||||
if False:
|
if False:
|
||||||
from typing import Any
|
from typing import Any, Dict
|
||||||
|
|
||||||
IRC_DOMAIN = "irc.example.com"
|
IRC_DOMAIN = "irc.example.com"
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
# | other sender| x | | |
|
# | other sender| x | | |
|
||||||
# public mode +-------------+-----+----+--------+----
|
# public mode +-------------+-----+----+--------+----
|
||||||
# | self sender | | | |
|
# | self sender | | | |
|
||||||
from typing import Set
|
from typing import Dict, List, Set
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import threading
|
import threading
|
||||||
|
|
|
@ -22,6 +22,7 @@ import ujson
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../api"))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../api"))
|
||||||
import zulip
|
import zulip
|
||||||
|
from typing import List
|
||||||
|
|
||||||
lock_path = "/var/tmp/log2zulip.lock"
|
lock_path = "/var/tmp/log2zulip.lock"
|
||||||
control_path = "/etc/log2zulip.conf"
|
control_path = "/etc/log2zulip.conf"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
from __future__ import absolute_import
|
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
|
from types import FrameType
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
from typing import Dict
|
||||||
|
|
||||||
sys.path.insert(0, os.path.dirname(__file__))
|
sys.path.insert(0, os.path.dirname(__file__))
|
||||||
import zulip_openshift_config as config
|
import zulip_openshift_config as config
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# https://github.com/python/mypy/issues/1141
|
# 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
|
# Change these values to configure authentication for the plugin
|
||||||
ZULIP_USER = 'openshift-bot@example.com'
|
ZULIP_USER = 'openshift-bot@example.com'
|
||||||
|
|
|
@ -43,7 +43,7 @@ import zulip_trac_config as config
|
||||||
VERSION = "0.9"
|
VERSION = "0.9"
|
||||||
|
|
||||||
if False:
|
if False:
|
||||||
from typing import Any
|
from typing import Any, Dict
|
||||||
|
|
||||||
if config.ZULIP_API_PATH is not None:
|
if config.ZULIP_API_PATH is not None:
|
||||||
sys.path.append(config.ZULIP_API_PATH)
|
sys.path.append(config.ZULIP_API_PATH)
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
if False:
|
if False:
|
||||||
from typing import Any, Generator, List, Tuple
|
from typing import Any, Dict, Generator, List, Tuple
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -38,7 +38,7 @@ from six.moves.configparser import SafeConfigParser
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
import logging
|
import logging
|
||||||
import six
|
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"
|
__version__ = "0.2.5"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue