8000 Remove Any from asyncio.create_task() by Dreamsorcerer · Pull Request #4840 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Remove Any from asyncio.create_task() #4840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tasks.pyi
  • Loading branch information
Dreamsorcerer authored Dec 19, 2020
commit dbc69e5a9dcb8f1b9ea6535e95f8ed7f44d551f2
5 changes: 3 additions & 2 deletions stdlib/3/asyncio/tasks.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,11 @@ class Task(Future[_T], Generic[_T]):

if sys.version_info >= (3, 7):
_TaskYieldType = Optional[Future[object]]

def all_tasks(loop: Optional[AbstractEventLoop] = ...) -> Set[Task[Any]]: ...
if sys.version_info >= (3, 8):
def create_task(coro: Union[Generator[_TaskYieldType, None, _T], Awaitable[_T]], *, name: Optional[str] = ...) -> Task[_T]: ...
def create_task(
coro: Union[Generator[_TaskYieldType, None, _T], Awaitable[_T]], *, name: Optional[str] = ...
) -> Task[_T]: ...
else:
def create_task(coro: Union[Generator[_TaskYieldType, None, _T], Awaitable[_T]]) -> Task[_T]: ...
def current_task(loop: Optional[AbstractEventLoop] = ...) -> Optional[Task[Any]]: ...
0