title: why does mypy `cast` only work some of the time?
body: <p>First I made a silly little class</p>
  
  <pre><code># cheese_helpers.py
  class Cheese:
      pass
  </code></pre>
  
  <p>Then this happened</p>
  
  <pre><code># weird.py
  
  import lxml
  from typing import cast, List
  import cheese_helpers
  
  o: List[Any] = []
  reveal_type(o) # builtins.List[Any] as expected
  
  y = cast(List[cheese_helpers.Cheese], o)  
  reveal_type(y)  # builtins.List[cheese_helpers.Cheese], as expected
  
  # so far so good. And then:
  
  z = cast(List[lxml.html.HtmlElement], o)  
  reveal_type(z) # builtins.List[Any] ???????????????
  </code></pre>
  
  <p>That last line should be <code>List[lxml.html.HtmlElement]</code> if you ask me. Cheese isn't annotated either and that works just fine.</p>
  
  <p>I'm sure that to make the last line work I need to get/make some lxml annotations. But it seems very strange to me that my <code>cast</code> is being completely ignored. I cast to the Cheese class and it works. I cast to the HtmlElement class and it doesn't. </p>
  
  <p>My question is why?</p>