Formatting: Use 4-space indentation #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #7
(assuming formatting the codebase with black is okay)
This is the style formatting currently used in #6. If this is merged (or another contributor formats with black) I will rebase #6, so the code changes will be easier to digest.
Formatting
PEP 8 and 257, fixes indentation to 4 spaces.
https://www.python.org/dev/peps/pep-0008/#indentation
How to recreate:
pip install -U black
black sample-code setup.py tests sample-code qencode --skip-string-normalization
Black's formatting style is basically just PEP8: https://black.readthedocs.io/en/stable/the_black_code_style.html
String normalization
Black will change single quotes to double quotes by default.
I turned it off to just keep the changes to structural formatting in this PR. I'm happy to revise the PR if it's preferred to have strings formatted as well.
Remove
skip-string-normalization
frompyproject.toml
and the above example command and rerun the formatter. All strings will now be consistently using double quotes.