title: mypy generic subclass leads to incompatible types
body: <p>I'm toying around with implementing monoids with type hinting. To that end I've written:</p>
  
  <pre><code>M = TypeVar('M')
  
  class Monoid(Generic[M]):
      ...
      def append(self, m: 'Monoid[M]') -&gt; 'Monoid[M]':
          raise NotImplementedError()
  </code></pre>
  
  <p>When using this in a subclass, e.g</p>
  
  <pre><code>A = TypeVar('A')
  
  class List(Monoid[A], Generic[A]):
      def __init__(self, *values: A) -&gt; None:
          self._values = tuple(values)
      ...
      def append(self, m: 'List[A]') -&gt; 'List[A]':
          return List(*(self.values + m.values))
  </code></pre>
  
  <p>I get <code>error: Argument 1 of "append" incompatible with supertype "Monoid"</code>. Since <code>List</code> is a proper subclass of <code>Monoid</code>, I would expect this to be able to type. What am I doing wrong?</p>