Skip to content

Commit 5ab9499

Browse files
emmatypingilevkivskyi
authored andcommitted
Remove unused imports (python#5193)
1 parent ec69b2d commit 5ab9499

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+84
-132
lines changed

mypy/applytype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Dict, Sequence, Optional
1+
from typing import Dict, Sequence, Optional
22

33
import mypy.subtypes
44
from mypy.sametypes import is_same_type

mypy/build.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,14 @@
2626
import subprocess
2727
import sys
2828
import time
29-
from os.path import dirname, basename
29+
from os.path import dirname
3030
import errno
3131

3232
from typing import (AbstractSet, Any, cast, Dict, Iterable, Iterator, List,
3333
Mapping, NamedTuple, Optional, Set, Tuple, Union, Callable)
34-
# Can't use TYPE_CHECKING because it's not in the Python 3.5.1 stdlib
35-
MYPY = False
36-
if MYPY:
37-
from typing import Deque
3834

3935
from mypy import sitepkgs
40-
from mypy.nodes import (MODULE_REF, MypyFile, Node, ImportBase, Import, ImportFrom, ImportAll)
36+
from mypy.nodes import (MypyFile, ImportBase, Import, ImportFrom, ImportAll)
4137
from mypy.semanal_pass1 import SemanticAnalyzerPass1
4238
from mypy.semanal import SemanticAnalyzerPass2, apply_semantic_analyzer_patches
4339
from mypy.semanal_pass3 import SemanticAnalyzerPass3

mypy/checkmember.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from mypy.expandtype import expand_type_by_instance, expand_type, freshen_function_type_vars
1818
from mypy.infer import infer_type_arguments
1919
from mypy.typevars import fill_typevars
20-
from mypy.plugin import Plugin, AttributeContext
20+
from mypy.plugin import AttributeContext
2121
from mypy import messages
2222
from mypy import subtypes
2323
from mypy import meet

mypy/constraints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from typing import Iterable, List, Optional, Sequence
44

5-
from mypy import experiments
65
from mypy.types import (
76
CallableType, Type, TypeVisitor, UnboundType, AnyType, NoneTyp, TypeVarType, Instance,
87
TupleType, TypedDictType, UnionType, Overloaded, ErasedType, PartialType, DeletedType,

mypy/dmypy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import sys
1515
import time
1616

17-
from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence, Tuple, TypeVar
17+
from typing import Any, Callable, Dict, Mapping, Optional, Tuple
1818

1919
from mypy.dmypy_util import STATUS_FILE, receive
2020
from mypy.util import write_junit_xml

mypy/dmypy_server.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
to enable fine-grained incremental reprocessing of changes.
77
"""
88

9-
import gc
10-
import io
119
import json
1210
import os
1311
import shutil
@@ -24,7 +22,6 @@
2422
from mypy.find_sources import create_source_list, InvalidSourceList
2523
from mypy.server.update import FineGrainedBuildManager
2624
from mypy.dmypy_util import STATUS_FILE, receive
27-
from mypy.gclogger import GcLogger
2825
from mypy.fscache import FileSystemCache
2926
from mypy.fswatcher import FileSystemWatcher, FileData
3027
from mypy.options import Options

mypy/erasetype.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
from mypy.types import (
44
Type, TypeVisitor, UnboundType, AnyType, NoneTyp, TypeVarId, Instance, TypeVarType,
55
CallableType, TupleType, TypedDictType, UnionType, Overloaded, ErasedType, PartialType,
6-
DeletedType, TypeTranslator, TypeList, UninhabitedType, TypeType, TypeOfAny
6+
DeletedType, TypeTranslator, UninhabitedType, TypeType, TypeOfAny
77
)
8-
from mypy import experiments
98

109

1110
def erase_type(typ: Type) -> Type:

mypy/expandtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from mypy.types import (
44
Type, Instance, CallableType, TypeVisitor, UnboundType, AnyType,
55
NoneTyp, TypeVarType, Overloaded, TupleType, TypedDictType, UnionType,
6-
ErasedType, TypeList, PartialType, DeletedType, UninhabitedType, TypeType, TypeVarId,
6+
ErasedType, PartialType, DeletedType, UninhabitedType, TypeType, TypeVarId,
77
FunctionLike, TypeVarDef
88
)
99

mypy/exprtotype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from mypy.nodes import (
44
Expression, NameExpr, MemberExpr, IndexExpr, TupleExpr,
55
ListExpr, StrExpr, BytesExpr, UnicodeExpr, EllipsisExpr, CallExpr,
6-
ARG_POS, ARG_NAMED, get_member_expr_fullname
6+
get_member_expr_fullname
77
)
88
from mypy.fastparse import parse_type_comment
99
from mypy.types import (

mypy/fastparse.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33

44
from typing import (
5-
Tuple, Union, TypeVar, Callable, Sequence, Optional, Any, cast, List, Set, overload
5+
Tuple, Union, TypeVar, Callable, Sequence, Optional, Any, cast, List, overload
66
)
77
from mypy.sharedparse import (
88
special_function_elide_names, argument_elide_name,
@@ -29,7 +29,6 @@
2929
TypeOfAny
3030
)
3131
from mypy import defaults
32-
from mypy import experiments
3332
from mypy import messages
3433
from mypy.errors import Errors
3534
from mypy.options import Options

0 commit comments

Comments
 (0)