title: How to avoid inherited members using autosummary and custom templates?
body: <p>I generate a python documentation using <code>sphinx.ext.autosummary</code>. The <code>autodoc</code> and <code>autosummary</code> is configured as follow in conf.py :</p>
  
  <pre><code>autodoc_member_order = 'bysource'
  ## Default flags used by autodoc directives
  autodoc_default_flags = ['members','undoc-members']
  ## Generate autodoc stubs with summaries from code
  autosummary_generate = True
  </code></pre>
  
  <p>I use a template :</p>
  
  <pre><code>myModuleName
  =======
  
  .. autosummary::
     :toctree: _autosummary
     :template: modules.rst
  
     myModule
  </code></pre>
  
  <p>Modules template is :</p>
  
  <pre><code>{{ fullname }}
  {{ underline }}
  
  .. automodule:: {{ fullname }}
  
     {% block functions %}
     {% if functions %}
     .. rubric:: Functions
  
     .. autosummary::
        :toctree: {{ objname }}
     {% for item in functions %}
        {{ item }}
     {%- endfor %}
     {% endif %}
     {% endblock %}
  
     {% block classes %}
     {% if classes %}
     .. rubric:: Classes
  
     .. autosummary::
        :toctree: {{ objname }}
        :template: class.rst
     {% for item in classes %}
        {{ item }}
     {%- endfor %}
     {% endif %}
     {% endblock %}
  
     {% block exceptions %}
     {% if exceptions %}
     .. rubric:: Exceptions
  
     .. autosummary::
     {% for item in exceptions %}
        {{ item }}
     {%- endfor %}
     {% endif %}
     {% endblock %}
  </code></pre>
  
  <p>And class template is :</p>
  
  <pre><code>{{ fullname }}
  {{ underline }}
  
  .. currentmodule:: {{ module }}
  
  .. autoclass:: {{ objname }}
  
     {% block methods %}
  
     {% if methods %}
     .. rubric:: Methods
  
     .. autosummary::
        :toctree: {{ objname }}
     {% for item in methods %}
        ~{{ name }}.{{ item }}
     {%- endfor %}
     {% endif %}
     {% endblock %}
  
     {% block attributes %}
     {% if attributes %}
     .. rubric:: Attributes
  
     .. autosummary::
        :toctree: {{ objname }}
     {% for item in attributes %}
        ~{{ name }}.{{ item }}
     {%- endfor %}
     {% endif %}
     {% endblock %}
  </code></pre>
  
  <p>It works fine but this adds every method inherited in the documentation while the flag 'show-inheritance' (which is supposed to add every inherited member) is absent. </p>
  
  <p>Any ideas?</p>