Skip to content

Change prefix for _importlib_modulespec names #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions stdlib/2/__builtin__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion stdlib/2/abc.pyi
Original file line number Diff line number Diff line change
@@ -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: ...

Expand Down
8 changes: 4 additions & 4 deletions stdlib/2/tokenize.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion stdlib/2/unittest.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
6 changes: 0 additions & 6 deletions stdlib/3/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions third_party/2/werkzeug/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions third_party/3/werkzeug/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down