diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index fc680ca78dc7..541122b27bc3 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -675,11 +675,6 @@ class xrange(Sized, Iterable[int], Reversible[int]): def __getitem__(self, i: int) -> int: ... def __reversed__(self) -> Iterator[int]: ... -class module: - __name__ = ... # type: str - __file__ = ... # type: str - __dict__ = ... # type: Dict[unicode, Any] - class property(object): def __init__(self, fget: Callable[[Any], Any] = None, fset: Callable[[Any, Any], None] = None, diff --git a/stdlib/2/abc.pyi b/stdlib/2/abc.pyi index a2d270f76f08..8e26348aa4cf 100644 --- a/stdlib/2/abc.pyi +++ b/stdlib/2/abc.pyi @@ -1,11 +1,12 @@ from typing import Any, Dict, Set, Tuple, Type +from types import ModuleType import _weakrefset # mypy has special processing for ABCMeta and abstractmethod. WeakSet = ... # type: _weakrefset.WeakSet _InstanceType = ... # type: type -types = ... # type: module +types = ... # type: ModuleType def abstractmethod(funcobj: Any) -> Any: ... diff --git a/stdlib/2/tokenize.pyi b/stdlib/2/tokenize.pyi index 159adf96d5f5..fbdccb4d0192 100644 --- a/stdlib/2/tokenize.pyi +++ b/stdlib/2/tokenize.pyi @@ -1,6 +1,7 @@ # Automatically generated by pytype, manually fixed up. May still contain errors. from typing import Any, Callable, Dict, Generator, Iterator, List, Tuple, Union, Iterable +from types import ModuleType __all__ = ... # type: List[str] __author__ = ... # type: str @@ -102,15 +103,14 @@ chain = ... # type: type double3prog = ... # type: type endprogs = ... # type: Dict[str, Any] pseudoprog = ... # type: type -re = ... # type: module single3prog = ... # type: type single_quoted = ... # type: Dict[str, str] -string = ... # type: module -sys = ... # type: module +string = ... # type: ModuleType +sys = ... # type: ModuleType t = ... # type: str tabsize = ... # type: int tok_name = ... # type: Dict[int, str] -token = ... # type: module +token = ... # type: ModuleType tokenprog = ... # type: type triple_quoted = ... # type: Dict[str, str] x = ... # type: str diff --git a/stdlib/2/unittest.pyi b/stdlib/2/unittest.pyi index 9f3f7d600288..25606e708391 100644 --- a/stdlib/2/unittest.pyi +++ b/stdlib/2/unittest.pyi @@ -9,6 +9,7 @@ from typing import ( overload, Set, FrozenSet, TypeVar, Union, Pattern, Type ) from abc import abstractmethod, ABCMeta +from types import ModuleType _T = TypeVar('_T') _FT = TypeVar('_FT') @@ -173,4 +174,4 @@ def main(module: str = ..., defaultTest: str = ..., testLoader: Any = ...) -> None: ... # TODO types # private but occasionally used -util = ... # type: module +util = ... # type: ModuleType diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 490c7f31a0ae..5264f22c44d5 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -731,12 +731,6 @@ class range(Sequence[int]): def __repr__(self) -> str: ... def __reversed__(self) -> Iterator[int]: ... -class module: - # TODO not defined in builtins! - __name__ = ... # type: str - __file__ = ... # type: str - __dict__ = ... # type: Dict[str, Any] - class property: def __init__(self, fget: Callable[[Any], Any] = None, fset: Callable[[Any, Any], None] = None, diff --git a/third_party/2/werkzeug/__init__.pyi b/third_party/2/werkzeug/__init__.pyi index 5bb4845f0f3f..c5e11e555756 100644 --- a/third_party/2/werkzeug/__init__.pyi +++ b/third_party/2/werkzeug/__init__.pyi @@ -23,11 +23,6 @@ from werkzeug import utils from werkzeug import wrappers from werkzeug import wsgi -class module(ModuleType): - def __getattr__(self, name): ... - def __dir__(self): ... - - __version__ = ... # type: Any run_simple = serving.run_simple diff --git a/third_party/3/werkzeug/__init__.pyi b/third_party/3/werkzeug/__init__.pyi index 806f96414f31..e15ad49cadc5 100644 --- a/third_party/3/werkzeug/__init__.pyi +++ b/third_party/3/werkzeug/__init__.pyi @@ -22,11 +22,6 @@ from werkzeug import utils from werkzeug import wrappers from werkzeug import wsgi -class module(ModuleType): - def __getattr__(self, name): ... - def __dir__(self): ... - - __version__ = ... # type: Any run_simple = serving.run_simple