code: def process_class_docstrings(app, what, name, obj, options, lines):
      
      if what == "class":
          joined = '\n'.join(lines)
  
          templates = [
              """.. rubric:: Attributes
  
  .. autosummary::
     :toctree:
  
     None
  """,
              """.. rubric:: Methods
  
  .. autosummary::
     :toctree:
  
     None
  """
          ]
  
          for template in templates:
              if template in joined:
                  joined = joined.replace(template, '')
          lines[:] = joined.split('\n')
docs: For those classes for which we use ::
  
      :template: autosummary/class_without_autosummary.rst
  
      the documented attributes/methods have to be listed in the class
      docstring. However, if one of those lists is empty, we use 'None',
      which then generates warnings in sphinx / ugly html output.
      This "autodoc-process-docstring" event connector removes that part
      from the processed docstring.