Formatting: Use 4-space indentation#1
Merged
obhodny merged 2 commits intoQencode-Corp:masterfrom Dec 6, 2021
Merged
Conversation
This was referenced Jul 6, 2020
This was referenced Jul 11, 2020
3b6eda3 to
41a7724
Compare
This was referenced Aug 10, 2020
Closed
To enable string normalization, remove this file/toggle the option and rerun black. Without string normalization the formatter is purely structural, single quotes will not be changed to double quotes.
See also: - https://www.python.org/dev/peps/pep-0008/#indentation - https://black.readthedocs.io/en/stable/the_black_code_style.html black *.py tests/**/*.py qencode/**/*.py
6a653a0 to
4353452
Compare
Contributor
Author
|
@qencode-dev @VladimirParkhomenko Rebased! As a start, how about we merge this? That will mean there's less conflicts in other PRs What do you think? |
Contributor
Author
|
@VladimirParkhomenko Thank you! I will give #6 a fresh look ASAP. The rebase needed is non-trivial so it may be a weekend thing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 blackblack sample-code setup.py tests sample-code qencode --skip-string-normalizationBlack'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-normalizationfrompyproject.tomland the above example command and rerun the formatter. All strings will now be consistently using double quotes.