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 1453a5bfda
commit a3a03bd6a5
129 changed files with 132 additions and 117 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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__), '..'))