Skip to content
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

Fix a docstring rst link rendering within an inline literal #13567

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qiskit/transpiler/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def operation_names(self):

@property
def instructions(self):
"""Get the list of tuples ``(:class:`~qiskit.circuit.Instruction`, (qargs))``
"""Get the list of tuples (:class:`~qiskit.circuit.Instruction`, (qargs))
Copy link
Contributor

@ElePT ElePT Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this! What do you think of maintaining the code formatting for the rest of the tuple? It would look like this:

Screenshot 2024-12-16 at 13 23 06
Suggested change
"""Get the list of tuples (:class:`~qiskit.circuit.Instruction`, (qargs))
"""Get the list of tuples ``(``:class:`~qiskit.circuit.Instruction` ``, (qargs))``

It's not perfect but I find it a bit easier to read, probably personal choice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding alert :-) before I opened the PR we had a little poll (of 3) here at the lab which included your suggestion and the applied fix was chosen unanimously. Personally I find it slightly cleaner visually.

Copy link
Contributor

@ElePT ElePT Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I am not to stand against unanimous votes. This change also looks good :)

for the target

For globally defined variable width operations the tuple will be of the form
Expand Down
Loading