Python 3 type annotations and subclasses : <p>How do I refer to 'any object that subclasses a parent class' in Python type annotations?</p>

<p>Example: <code>FooBase</code> is an abstract base class, from which <code>Foo1</code>, <code>Foo2</code>, etc. are subclassed. I want the function to accept any descendant of <code>FooBase</code>. Will this do:</p>

<pre><code>def do_something(self, bar:FooBase):
    pass
</code></pre>

<p>Or will this only accept an object of class <code>FooBase</code>, which of course is impossible given that <code>FooBase</code> is abstract? In that case, do I need to build a <code>Union</code> of all cases (please God I hope not!), or can I through some other way express this relationship abstractly?</p>
