do not use `self` to target static attributes, it should be `IsObjectContainingEntries.hidden`. Also please break the statement to make the line shorter.

    attributes = dict(
      (key, getattr(inst, key))
      for key in dir(inst)
      if not key.startswith('__')
      and key not in IsObjectContainingEntries.hidden
    )