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

More fixing extra whitespace surrounding docstrings #9707

Merged
merged 4 commits into from
Mar 3, 2023

Conversation

jlapeyre
Copy link
Contributor

@jlapeyre jlapeyre commented Mar 2, 2023

This fixes some formatting typos in some docstrings.

This is a followup to #9689. There are four cases found as follows

> ruff check --select=D210  qiskit tools test
qiskit/qasm/qasmlexer.py:127:9: D210 [*] No whitespaces allowed surrounding docstring text
qiskit/quantum_info/operators/symplectic/stabilizer_table.py:1030:9: D210 [*] No whitespaces allowed surrounding docstring text
test/python/result/test_result.py:130:9: D210 [*] No whitespaces allowed surrounding docstring text
test/python/visualization/test_circuit_text_drawer.py:13:1: D210 [*] No whitespaces allowed surrounding docstring text

These cases are compounded by other quirks or typos in the docstrings. Both the extra whitespace and quirks are fixed manually here.

Summary

Details and comments

These cases are compounded by other quirks or typos in the docstrings.
Both the extra whitespace and quirks are fixed here.
@jlapeyre jlapeyre requested review from a team, nonhermitian and ikkoham as code owners March 2, 2023 14:07
@jlapeyre jlapeyre added the type: qa Issues and PRs that relate to testing and code quality label Mar 2, 2023
@Qiskit Qiskit deleted a comment from qiskit-bot Mar 2, 2023
@coveralls
Copy link

coveralls commented Mar 2, 2023

Pull Request Test Coverage Report for Build 4319779086

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 8 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.002%) to 85.343%

Files with Coverage Reduction New Missed Lines %
src/vf2_layout.rs 8 86.44%
Totals Coverage Status
Change from base Build 4319472895: 0.002%
Covered Lines: 68032
Relevant Lines: 79716

💛 - Coveralls

jakelishman
jakelishman previously approved these changes Mar 2, 2023
r"\"([^\\\"]|\\.)*\" "
r"\"([^\\\"]|\\.)*\""
Copy link
Member

Choose a reason for hiding this comment

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

This might be dangerous, but I don't 100% know - the Python version of lex interprets docstrings, so the whitespace might be significant. (But I very much don't know.) That said, if this commit does have an effect, then I think your new form is correct anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, now I remember. black will insert that space again.

@jakelishman jakelishman added Changelog: None Do not include in changelog automerge labels Mar 2, 2023
@mergify mergify bot merged commit 1078786 into Qiskit:main Mar 3, 2023
king-p3nguin pushed a commit to king-p3nguin/qiskit-terra that referenced this pull request May 22, 2023
* Fix extra whitespace surrounding docstrings

These cases are compounded by other quirks or typos in the docstrings.
Both the extra whitespace and quirks are fixed here.

* Prevent black from adding trailing space in docstring

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants