mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
switch order of base classes on awaitable classes (#2125)
Fixes #1940. This makes it so that mypy will infer the common base class of these classes to be Awaitable instead of Iterable. I verified that this fixes the errors in the script posted by @neilconway.
This commit is contained in:
committed by
Guido van Rossum
parent
7abcd0f71f
commit
cb293ebd2e
@@ -26,7 +26,7 @@ class _TracebackLogger:
|
||||
if sys.version_info >= (3, 5):
|
||||
def isfuture(obj: object) -> bool: ...
|
||||
|
||||
class Future(Iterable[_T], Awaitable[_T], Generic[_T]):
|
||||
class Future(Awaitable[_T], Iterable[_T]):
|
||||
_state = ... # type: str
|
||||
_exception = ... # type: BaseException
|
||||
_blocking = False
|
||||
|
||||
Reference in New Issue
Block a user