make sure typevars defined in stubs are private (#989)

And also a few type aliases I noticed in the process.

Found using 59f9cac095
This commit is contained in:
Jelle Zijlstra
2017-03-13 07:32:40 -07:00
committed by Guido van Rossum
parent 984307bf45
commit eb07fd3c1a
13 changed files with 123 additions and 123 deletions

View File

@@ -9,7 +9,7 @@ def strip_leading_underscores(attribute_name: AnyStr) -> AnyStr: ...
NOTHING = Any
T = TypeVar('T')
_T = TypeVar('_T')
def attributes(
attrs: Sequence[Union[AnyStr, Attribute]],
@@ -18,7 +18,7 @@ def attributes(
apply_with_repr: bool = True,
apply_immutable: bool = False,
store_attributes: Optional[Callable[[type, Attribute], Any]] = None,
**kw: Optional[dict]) -> Callable[[Type[T]], Type[T]]: ...
**kw: Optional[dict]) -> Callable[[Type[_T]], Type[_T]]: ...
class Attribute:
def __init__(

View File

@@ -1,9 +1,9 @@
from typing import Dict, Type, TypeVar, Union
T = TypeVar('T')
_T = TypeVar('_T')
def TypedDict(typename: str, fields: Dict[str, Type[T]]) -> Type[dict]: ...
def TypedDict(typename: str, fields: Dict[str, Type[_T]]) -> Type[dict]: ...
# Return type that indicates a function does not return.
# This type is equivalent to the None type, but the no-op Union is necessary to