title: Type hint a subclass of list
body: <p>I use a class which subclasses the built-in list.</p>
  
  <pre><code>class Qry(list):
      """Stores a list indexable by attributes."""
  
      def filter(self, **kwargs):
          """Returns the items in Qry that has matching attributes.
  
          Example:
              obj.filter(portfolio='123', account='ABC').
          """
  
          values = tuple(kwargs.values())
  
          def is_match(item):
              if tuple(getattr(item, y) for y in kwargs.keys()) == values:
                  return True
              else:
                  return False
  
          result = Qry([x for x in self if is_match(x)], keys=self._keys)
  
          return result
  </code></pre>
  
  <p>Now I want to type hint:</p>
  
  <pre><code>class C:
      a = 1
  
  def foo(qry: Qry[C]):
      """Do stuff here."""
  </code></pre>
  
  <p>How do you type hint a custom container class in python 3.5+?</p>