title: How to add type annotation to asyncio.Task
body: <p>I have a code which look like this:</p>
  
  <pre><code>import asyncio
  from typing import List
  
  def some_callback(result):
      print(result)
  
  async def b() -&gt; List[int]:
      return [1, 2, 3]
  
  async def a() -&gt; None:
      search = asyncio.ensure_future(b())
      search.add_done_callback( some_callback)
      await search
  
  loop = asyncio.get_event_loop()
  loop.run_until_complete(a())
  loop.close()
  </code></pre>
  
  <p>I am trying to add type annotations to the <code>some_callback</code> function, but I can't fully understand hoe to annotate the <code>result</code> variable. Should it be <code>Coroutine</code>? Or maybe <code>Awaitable</code>?</p>
  
  <p>When I am using the <code>reveal_type</code> of <code>mypy</code>, the output about the <code>result</code> variable is <code>Any</code>.</p>
  
  <p>The output of this program is:</p>
  
  <pre><code>&lt;Task finished coro=&lt;b() done, defined at ____.py:7&gt; result=[1, 2, 3]&gt;
  </code></pre>
  
  <p>How should I document this function properly?</p>