Follow PEP8: Method definitions inside a class are surrounded by a single blank line#954
Merged
bwendling merged 2 commits intogoogle:mainfrom Aug 23, 2021
Merged
Conversation
Member
|
Thanks! Please update the CHANGELOG as well. |
Contributor
Author
|
Thanks! I updated the changelog. |
Codym48
added a commit
to Codym48/cmake_saver
that referenced
this pull request
Mar 13, 2022
This is more consistent with PEP8. There was a bug in yapf 0.28.0 through 0.31.0 that led to this setting being false by default for based_on_style=pep8. google/yapf#954 updated yapf to default blank_line_before_nested_class_or_def to true to correctly insert this blank line. Rather than explicitly set blank_line_before_nested_class_or_def to true, just update the offending file and leave that line missing from the configuration. This will fail yapf formatting with yapf < 0.32.0 but should allow us to stay more pep8 compliant if there are future changes to these settings.
Wdomda90
approved these changes
Jul 3, 2022
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.
Adjust
yapfso its PEP8 style follows PEP8 regarding blank lines around class methods. Quote from PEP8:Closes #744