Future.set_running_or_notify_cancel returns bool (#1911)

Future.set_running_or_notify_cancel returns a bool, not None. See commit
13bcc79c12, where this problem was fixed
for Python 2.
This commit is contained in:
Daniel Li
2018-02-22 12:03:37 -05:00
committed by Jelle Zijlstra
parent 7ae2f25216
commit 2c6296034f

View File

@@ -27,7 +27,7 @@ class Future(Generic[_T]):
def add_done_callback(self, fn: Callable[[Future[_T]], Any]) -> None: ...
def result(self, timeout: Optional[float] = ...) -> _T: ...
def exception(self, timeout: Optional[float] = ...) -> Optional[BaseException]: ...
def set_running_or_notify_cancel(self) -> None: ...
def set_running_or_notify_cancel(self) -> bool: ...
def set_result(self, result: _T) -> None: ...
def set_exception(self, exception: Optional[BaseException]) -> None: ...