mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 10:03:32 +08:00
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:
committed by
Guido van Rossum
parent
984307bf45
commit
eb07fd3c1a
@@ -4,7 +4,7 @@ from .coroutines import coroutine
|
||||
from .events import AbstractEventLoop
|
||||
from .futures import Future
|
||||
|
||||
T = TypeVar('T')
|
||||
_T = TypeVar('_T')
|
||||
|
||||
__all__ = ... # type: str
|
||||
|
||||
@@ -44,7 +44,7 @@ class Condition(_ContextManagerMixin):
|
||||
@coroutine
|
||||
def wait(self) -> Generator[Any, None, bool]: ...
|
||||
@coroutine
|
||||
def wait_for(self, predicate: Callable[[], T]) -> Generator[Any, None, T]: ...
|
||||
def wait_for(self, predicate: Callable[[], _T]) -> Generator[Any, None, _T]: ...
|
||||
def notify(self, n: int = 1) -> None: ...
|
||||
def notify_all(self) -> None: ...
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ __all__ = ... # type: str
|
||||
class QueueEmpty(Exception): ...
|
||||
class QueueFull(Exception): ...
|
||||
|
||||
T = TypeVar('T')
|
||||
_T = TypeVar('_T')
|
||||
|
||||
class Queue(Generic[T]):
|
||||
class Queue(Generic[_T]):
|
||||
def __init__(self, maxsize: int = ..., *, loop: AbstractEventLoop = ...) -> None: ...
|
||||
def _init(self, maxsize: int) -> None: ...
|
||||
def _get(self) -> T: ...
|
||||
def _put(self, item: T) -> None: ...
|
||||
def _get(self) -> _T: ...
|
||||
def _put(self, item: _T) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def _format(self) -> str: ...
|
||||
@@ -28,11 +28,11 @@ class Queue(Generic[T]):
|
||||
def empty(self) -> bool: ...
|
||||
def full(self) -> bool: ...
|
||||
@coroutine
|
||||
def put(self, item: T) -> Generator[Any, None, None]: ...
|
||||
def put_nowait(self, item: T) -> None: ...
|
||||
def put(self, item: _T) -> Generator[Any, None, None]: ...
|
||||
def put_nowait(self, item: _T) -> None: ...
|
||||
@coroutine
|
||||
def get(self) -> Generator[Any, None, T]: ...
|
||||
def get_nowait(self) -> T: ...
|
||||
def get(self) -> Generator[Any, None, _T]: ...
|
||||
def get_nowait(self) -> _T: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
@coroutine
|
||||
def join(self) -> Generator[Any, None, bool]: ...
|
||||
|
||||
Reference in New Issue
Block a user