mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-05 19:13:24 +08:00
multiprocessing: Fix timeout args of AsyncResult methods (#1984)
The timeout argument of wait and get methods of AsyncResult accepts also None so fix the type specification to include Optional. Accepting None is not an implementation detail as it's clearly documented too: https://docs.python.org/2/library/multiprocessing.html#multiprocessing.pool.AsyncResult https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.AsyncResult
This commit is contained in:
committed by
Jelle Zijlstra
parent
eb571e9cbb
commit
4da20cb8b7
@@ -8,8 +8,8 @@ from typing import (
|
||||
_T = TypeVar('_T', bound='Pool')
|
||||
|
||||
class AsyncResult():
|
||||
def get(self, timeout: float = ...) -> Any: ...
|
||||
def wait(self, timeout: float = ...) -> None: ...
|
||||
def get(self, timeout: Optional[float] = ...) -> Any: ...
|
||||
def wait(self, timeout: Optional[float] = ...) -> None: ...
|
||||
def ready(self) -> bool: ...
|
||||
def successful(self) -> bool: ...
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ from typing import (
|
||||
_T = TypeVar('_T', bound='Pool')
|
||||
|
||||
class AsyncResult():
|
||||
def get(self, timeout: float = ...) -> Any: ...
|
||||
def wait(self, timeout: float = ...) -> None: ...
|
||||
def get(self, timeout: Optional[float] = ...) -> Any: ...
|
||||
def wait(self, timeout: Optional[float] = ...) -> None: ...
|
||||
def ready(self) -> bool: ...
|
||||
def successful(self) -> bool: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user