mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
mypy: Added Dict, List and Set imports.
Fixed mypy errors associated with the upgrade.
This commit is contained in:
committed by
Tim Abbott
parent
1453a5bfda
commit
a3a03bd6a5
@@ -7,7 +7,7 @@ from lib import sanity_check
|
||||
sanity_check.check_venv(__file__)
|
||||
|
||||
from collections import defaultdict
|
||||
from typing import Any, Dict, Iterable, Set
|
||||
from typing import Any, Dict, Iterable, List, Set
|
||||
|
||||
import cgi
|
||||
import os
|
||||
|
||||
@@ -6,6 +6,7 @@ import optparse
|
||||
import sys
|
||||
|
||||
from six.moves import filter
|
||||
from typing import List
|
||||
|
||||
# check for the venv
|
||||
from lib import sanity_check
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
from typing import Set, Tuple
|
||||
from typing import List, Set, Tuple
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
from typing import Optional
|
||||
from typing import Dict, List, Optional, Set
|
||||
|
||||
import re
|
||||
from collections import defaultdict
|
||||
|
||||
@@ -2,6 +2,7 @@ from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
from collections import defaultdict
|
||||
from six.moves import range
|
||||
from typing import Dict, List, Set
|
||||
|
||||
from .html_branches import html_branches, HtmlTreeBranch
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
from typing import Any
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from .template_parser import (
|
||||
tokenize,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
from typing import Callable, Optional
|
||||
from typing import Callable, List, Optional
|
||||
from six.moves import range
|
||||
import re
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ from tornado.ioloop import IOLoop
|
||||
from tornado.websocket import WebSocketHandler, websocket_connect
|
||||
|
||||
if False:
|
||||
from typing import Any, Callable, Generator, Optional
|
||||
from typing import Any, Callable, Generator, List, Optional
|
||||
|
||||
if 'posix' in os.name and os.geteuid() == 0:
|
||||
raise RuntimeError("run-dev.py should not be run as root.")
|
||||
|
||||
@@ -12,7 +12,7 @@ import sys
|
||||
import hashlib
|
||||
import xml.etree.ElementTree as ET
|
||||
from six import unichr
|
||||
from typing import Union, Text
|
||||
from typing import Dict, Text, Union
|
||||
from os.path import dirname
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from itertools import permutations, chain
|
||||
import ujson
|
||||
|
||||
from six.moves import range, zip
|
||||
from typing import Text
|
||||
from typing import Dict, List, Text
|
||||
|
||||
# the corresponding code point will be set to exactly these names as a
|
||||
# final pass, overriding any other rules. This is useful for cases
|
||||
|
||||
@@ -4,6 +4,7 @@ import re
|
||||
from collections import defaultdict
|
||||
import os
|
||||
import sys
|
||||
from typing import Dict
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user