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

Add ticks and 4-space tabs to docstrings #176

Merged
merged 1 commit into from
May 14, 2023
Merged

Conversation

caleb-johnson
Copy link
Collaborator

@caleb-johnson caleb-johnson commented May 14, 2023

#172 aimed to clean up and standardize our docstrings. The style choices made were geared toward reducing verbosity.

The removal of tick marks from arg and exception lists and decision to use 2-space tabs will need to be reverted because:

  • Sphinx throws erroneous indent errors sometimes when tick marks aren't present
  • 2-space tabs, in conjunction with tick marks, results in unindented blocks of code which are hard to read, so we go with 4 spaces now

@caleb-johnson caleb-johnson added bug Something isn't working and removed bug Something isn't working labels May 14, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 4969813048

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage remained the same at 88.122%

Files with Coverage Reduction New Missed Lines %
circuit_knitting_toolbox/utils/orbital_reduction.py 1 60.0%
Totals Coverage Status
Change from base Build 4967700657: 0.0%
Covered Lines: 2055
Relevant Lines: 2332

💛 - Coveralls

@caleb-johnson caleb-johnson changed the title Add ticks and 4-space tabs Add ticks and 4-space tabs to docstrings May 14, 2023
@caleb-johnson caleb-johnson merged commit 51db086 into main May 14, 2023
8 checks passed
@caleb-johnson caleb-johnson deleted the docstring-fixes branch May 14, 2023 01:31
@garrison
Copy link
Member

I have a PR from the repository we are migrating from (number 106) that managed to get rid of all the tick marks in the argument lists in a few modules. Looks like I used 4 spaces there. I checked everything carefully on Sphinx before merging it.

@caleb-johnson
Copy link
Collaborator Author

I have a PR from the repository we are migrating from (number 106) that managed to get rid of all the tick marks in the argument lists in a few modules. Looks like I used 4 spaces there. I checked everything carefully on Sphinx before merging it.

I have a docstring in cutting_evaluation that I could not get sphinx to understand no matter what I did. I fought with it for several hours and the only thing that made it understand the indention was the tick marks

caleb-johnson added a commit that referenced this pull request May 14, 2023
@caleb-johnson
Copy link
Collaborator Author

caleb-johnson commented May 14, 2023

I have a PR from the repository we are migrating from (number 106) that managed to get rid of all the tick marks in the argument lists in a few modules. Looks like I used 4 spaces there. I checked everything carefully on Sphinx before merging it.

I have a docstring in cutting_evaluation that I could not get sphinx to understand no matter what I did. I fought with it for several hours and the only thing that made it understand the indention was the tick marks

You're right. It was the 2-space tabs causing confusion. The ticks fixed it, but going to 4-space tabs would fix it too. I'm reverting the "tick-mark" PR and just going with 4 space tabs everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants