Skip to content

Commit 1b6f63b

Browse files
authored
Remove duplicate imports in mypy (#11242)
1 parent 8f6225a commit 1b6f63b

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

mypy/expandtype.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from mypy.types import (
44
Type, Instance, CallableType, TypeVisitor, UnboundType, AnyType,
5-
NoneType, TypeVarType, Overloaded, TupleType, TypedDictType, UnionType,
5+
NoneType, Overloaded, TupleType, TypedDictType, UnionType,
66
ErasedType, PartialType, DeletedType, UninhabitedType, TypeType, TypeVarId,
77
FunctionLike, TypeVarType, LiteralType, get_proper_type, ProperType,
88
TypeAliasType, ParamSpecType

mypy/fastparse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import typing # for typing.Type, which conflicts with types.Type
77
from typing import (
8-
Tuple, Union, TypeVar, Callable, Sequence, Optional, Any, Dict, cast, List, overload
8+
Tuple, Union, TypeVar, Callable, Sequence, Optional, Any, Dict, cast, List
99
)
1010
from typing_extensions import Final, Literal, overload
1111

mypy/server/astmerge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
from mypy.traverser import TraverserVisitor
5858
from mypy.types import (
5959
Type, SyntheticTypeVisitor, Instance, AnyType, NoneType, CallableType, ErasedType, DeletedType,
60-
TupleType, TypeType, TypeVarType, TypedDictType, UnboundType, UninhabitedType, UnionType,
60+
TupleType, TypeType, TypedDictType, UnboundType, UninhabitedType, UnionType,
6161
Overloaded, TypeVarType, TypeList, CallableArgument, EllipsisType, StarType, LiteralType,
6262
RawExpressionType, PartialType, PlaceholderType, TypeAliasType
6363
)

mypy/test/test_find_sources.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from mypy.find_sources import InvalidSourceList, SourceFinder, create_source_list
99
from mypy.fscache import FileSystemCache
10-
from mypy.modulefinder import BuildSource
1110
from mypy.options import Options
1211
from mypy.modulefinder import BuildSource
1312

mypy/test/typefixture.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from mypy.semanal_shared import set_callable_name
99
from mypy.types import (
10-
Type, TypeVarType, AnyType, NoneType, Instance, CallableType, TypeVarType, TypeType,
10+
Type, AnyType, NoneType, Instance, CallableType, TypeVarType, TypeType,
1111
UninhabitedType, TypeOfAny, TypeAliasType, UnionType, LiteralType
1212
)
1313
from mypy.nodes import (

mypy/typeanal.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
from mypy.messages import MessageBuilder, quote_type_string, format_type_bare
1313
from mypy.options import Options
1414
from mypy.types import (
15-
Type, UnboundType, TypeVarType, TupleType, TypedDictType, UnionType, Instance, AnyType,
15+
Type, UnboundType, TupleType, TypedDictType, UnionType, Instance, AnyType,
1616
CallableType, NoneType, ErasedType, DeletedType, TypeList, TypeVarType, SyntheticTypeVisitor,
17-
StarType, PartialType, EllipsisType, UninhabitedType, TypeType, TypeVarLikeType,
18-
CallableArgument, TypeQuery, union_items, TypeOfAny, LiteralType, RawExpressionType,
19-
PlaceholderType, Overloaded, get_proper_type, TypeAliasType, TypeVarLikeType, ParamSpecType
17+
StarType, PartialType, EllipsisType, UninhabitedType, TypeType, CallableArgument,
18+
TypeQuery, union_items, TypeOfAny, LiteralType, RawExpressionType,
19+
PlaceholderType, Overloaded, get_proper_type, TypeAliasType,
20+
TypeVarLikeType, ParamSpecType
2021
)
2122

2223
from mypy.nodes import (

mypy/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from typing import (
99
Any, TypeVar, Dict, List, Tuple, cast, Set, Optional, Union, Iterable, NamedTuple,
10-
Sequence, Iterator, overload
10+
Sequence, Iterator
1111
)
1212
from typing_extensions import ClassVar, Final, TYPE_CHECKING, overload
1313

0 commit comments

Comments
 (0)