Get inner type from concrete type associated with a TypeVar : <p>I'm using <code>mypy</code> and the <code>typing</code> module in python. Imagine I have a generic type:</p>

<pre><code>ContainerT = TypeVar('ContainerT')

class Thingy(Generic[ContainerT]):
    pass
</code></pre>

<p>However I want to get at another type inside the concrete type associated with the TypeVar like in the example below:</p>

<pre><code>class SomeContainer(object):
    Iterator = SomeCustomIterator

ContainerT = TypeVar('ContainerT')

class Thingy(Generic[ContainerT]):
    def foo(self) -&gt; ContainerT.Iterator:
        pass
</code></pre>

<p>I get an error saying that <code>TypeVar</code> does not have a member <code>Iterator</code>. Is there another way to reformulate this so I can associate one type with another?</p>

<p>Thank you.</p>
