title: How to fix mypy's incompatible with return type error by not using Union
body: <p>I'm currently working on an API wrapper that will support asynchronous as well.<br />
  So I decided to create an asynchronous Client by inheriting from an asynchronous regular Client.</p>
  <pre class="lang-py prettyprint-override"><code># Test
  
  import requests
  import aiohttp
  
  
  class Client:
    def request(self, url: str) -&gt; requests.Response:
      ...
  
  
  class AsyncClient(Client):
    def request(self, url: str) -&gt; aiohttp.ClientResponse:
      ...
  </code></pre>
  <p>Then, the mypy gave me the following error.<br />
  <code>error: Return type &quot;ClientResponse&quot; of &quot;request&quot; incompatible with return type &quot;Response&quot; in supertype &quot;Client&quot;</code><br />
  I know I can use <code>Union</code>, but I don't want to <code>import</code> the async Client into the sync Client code, because I want the async Client to be an option that I can use if I do the following
  <code>pip3 install myapiwrapper[async]</code>.<br />
  Is there any way I can resolve this error somehow?</p>