Skip to content

Commit

Permalink
Fix docstring format errors found by ruff (Qiskit#9708)
Browse files Browse the repository at this point in the history
* Remove blank lines before class docstring, ruff D211

* Capitalize first word of docstrings, ruff D403

* Remove empty docstrings, ruff 419

* Remove blank line before function docstring, ruff D201

* Add colon to docstring section names, ruff D416

* Move closing triple quote in docstring to newline, ruff D208

The ruff rule D208 is actually "Docstring is over-indented". In fact they are
not overindented. But the error is somehow triggered because there is
no newline fore the closing triple quote. Adding this newline silences the
error.

* Use canonical capitalizatio of section names in docstrings, ruff D405

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
jlapeyre and mergify[bot] authored Mar 2, 2023
1 parent 6ab635d commit b5b6de5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion qiskit/algorithms/time_evolvers/pvqd/pvqd.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def get_loss(
dt: float,
current_parameters: np.ndarray,
) -> tuple[Callable[[np.ndarray], float], Callable[[np.ndarray], np.ndarray]] | None:

"""Get a function to evaluate the infidelity between Trotter step and ansatz.
Args:
Expand Down

0 comments on commit b5b6de5

Please sign in to comment.