Skip to content

Commit e0a75a6

Browse files
authored
Remove doc inheritance from circuit library subclasses of QuantumCircuit (Qiskit#14598)
* Remove doc inheritance from circuit library subclasses of QuantumCircuit * Use separate template to remove inheritance for library subclasses * Update existing template rather than create new one * Revert changes to circuit library __init__
1 parent 1326365 commit e0a75a6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/_templates/autosummary/class_no_inherited_members.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
:show-inheritance:
1010

1111
{% block attributes_summary %}
12-
{% if attributes %}
12+
{% set wanted_attributes = (attributes | reject('in', inherited_members) | list) %}
13+
{% if wanted_attributes %}
1314
.. rubric:: Attributes
14-
{% for item in attributes %}
15+
{% for item in wanted_attributes %}
1516
.. autoattribute:: {{ item }}
1617
{%- endfor %}
1718
{% endif %}
18-
{% endblock -%}
19+
{% endblock %}
1920

2021
{% block methods_summary %}
2122
{% set wanted_methods = (methods | reject('in', inherited_members) | reject('==', '__init__') | list) %}

0 commit comments

Comments
 (0)