Skip to content

Commit

Permalink
Remove non overidden base methods/attributes from classes (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
manoelmarques authored Jun 13, 2021
1 parent e033b23 commit 87c9316
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .pylintdict
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ autosummary
avogadro
backend
barkoutsos
bb
bergholm
berlin
bitstring
Expand Down Expand Up @@ -351,6 +352,7 @@ uncompiled
unitaries
untransforms
uvcc
vals
variational
vibrational
vibrationalop
Expand Down
22 changes: 11 additions & 11 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:show-inheritance:
:no-members:
:no-inherited-members:
:no-special-members:
Expand All @@ -20,9 +21,11 @@
.. autosummary::
:toctree: ../stubs/
{% for item in all_attributes %}
{%- if not item.startswith('_') %}
{{ name }}.{{ item }}
{%- endif -%}
{%- if item not in inherited_members %}
{%- if not item.startswith('_') %}
~{{ name }}.{{ item }}
{%- endif -%}
{%- endif %}
{%- endfor %}
{% endif %}
{% endblock %}
Expand All @@ -35,14 +38,11 @@
.. autosummary::
:toctree: ../stubs/
{% for item in all_methods %}
{%- if not item.startswith('_') or item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% for item in inherited_members %}
{%- if item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
{{ name }}.{{ item }}
{%- endif -%}
{%- if item not in inherited_members %}
{%- if not item.startswith('_') or item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
~{{ name }}.{{ item }}
{%- endif -%}
{%- endif %}
{%- endfor %}

{% endif %}
Expand Down
Loading

0 comments on commit 87c9316

Please sign in to comment.