Revert __import__ function annotation to return type back to Any (#3383)

From python/mypy#7582.

This partially reverts back the change in
0ee7c3c38b to have `__import__` return
`Any` instead of `ModuleType`.
This commit is contained in:
Eric N. Vander Weele
2019-10-17 18:10:41 -04:00
committed by Sebastian Rittau
parent fd7f1063d5
commit 966f8d24e6
2 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ from typing import (
)
from abc import abstractmethod, ABCMeta
from ast import mod, AST
from types import TracebackType, CodeType, ModuleType
from types import TracebackType, CodeType
import sys
if sys.version_info >= (3,):
@@ -1455,7 +1455,7 @@ else:
def __import__(name: Text, globals: Optional[Mapping[str, Any]] = ...,
locals: Optional[Mapping[str, Any]] = ...,
fromlist: Sequence[str] = ...,
level: int = ...) -> ModuleType: ...
level: int = ...) -> Any: ...
# Actually the type of Ellipsis is <type 'ellipsis'>, but since it's
# not exposed anywhere under that name, we make it private here.

View File

@@ -11,7 +11,7 @@ from typing import (
)
from abc import abstractmethod, ABCMeta
from ast import mod, AST
from types import TracebackType, CodeType, ModuleType
from types import TracebackType, CodeType
import sys
if sys.version_info >= (3,):
@@ -1455,7 +1455,7 @@ else:
def __import__(name: Text, globals: Optional[Mapping[str, Any]] = ...,
locals: Optional[Mapping[str, Any]] = ...,
fromlist: Sequence[str] = ...,
level: int = ...) -> ModuleType: ...
level: int = ...) -> Any: ...
# Actually the type of Ellipsis is <type 'ellipsis'>, but since it's
# not exposed anywhere under that name, we make it private here.