-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate headers for overloaded methods #167
Labels
Milestone
Comments
Eric-Arellano
changed the title
API Reference has incorrect heading and indentation structure
Duplicate headers for overloaded methods
Jan 26, 2024
@frankharkins fixed the bad I renamed the issue title to focus on that problem. |
Eric-Arellano
modified the milestones:
24-02-13 Qiskit 1.0,
12-MARCH-2024 qiskit 1.0 release part 2
Jan 30, 2024
javabster
modified the milestones:
24-05-21 qiskit 1.0 release part 2,
runtime primitives release
Feb 16, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 27, 2024
Closes #167 The script was creating a title for every `<dt>` tag inside a `<dl>` tag. This is almost always correct given that we only have a `<dt>` tag for each method. The problem with overload methods is that we have a `<dt>` for each `@typing.overload` definition. For example, the `quantumcircuit.py` file overloads the definition of for_loop: https://github.com/Qiskit/qiskit/blob/244940a10c17f1dc3d74e2665a3ae869dc3d7291/qiskit/circuit/quantumcircuit.py#L4862-L4884 This is an example of the HTML generated ```html <dl class="py method"> <dt class="sig sig-object py" id="qiskit.circuit.QuantumCircuit.for_loop"> <span class="sig-name descname"><span class="pre">for_loop</span> <dt class="sig sig-object py"> <span class="sig-name descname"><span class="pre">for_loop</span> <dd><p>Create a <code class="docutils literal notranslate"><span class="pre">for</span></code> loop on this circuit.</p> ``` To solve the problem this PR adds an extra condition to check whether the `<dt>` tag has an id or not. Only the first `<dt>` tag will have an id, so we can use this fact to create only one `<h3>` for each method.
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
Closes Qiskit#167 The script was creating a title for every `<dt>` tag inside a `<dl>` tag. This is almost always correct given that we only have a `<dt>` tag for each method. The problem with overload methods is that we have a `<dt>` for each `@typing.overload` definition. For example, the `quantumcircuit.py` file overloads the definition of for_loop: https://github.com/Qiskit/qiskit/blob/244940a10c17f1dc3d74e2665a3ae869dc3d7291/qiskit/circuit/quantumcircuit.py#L4862-L4884 This is an example of the HTML generated ```html <dl class="py method"> <dt class="sig sig-object py" id="qiskit.circuit.QuantumCircuit.for_loop"> <span class="sig-name descname"><span class="pre">for_loop</span> <dt class="sig sig-object py"> <span class="sig-name descname"><span class="pre">for_loop</span> <dd><p>Create a <code class="docutils literal notranslate"><span class="pre">for</span></code> loop on this circuit.</p> ``` To solve the problem this PR adds an extra condition to check whether the `<dt>` tag has an id or not. Only the first `<dt>` tag will have an id, so we can use this fact to create only one `<h3>` for each method.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
URL to the relevant documentation
https://docs.quantum-computing.ibm.com/api/qiskit/qiskit.circuit.QuantumCircuit
Please describe the UI problem.
For example, look at the right sidebar:
Each Example and Notes section should have the most indentation, but they have the least. Also, there are duplicates like
if_test
that show up with the same indentation.The text was updated successfully, but these errors were encountered: