Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Fix No blank line after if/for/while/def#1180

Open
ashmichheda wants to merge10 commits intogoogle:main
base:main
Choose a base branch
Loading
fromashmichheda:fix-blank-line

Conversation

ashmichheda
Copy link

This PRfixes#1091

@@ -108,6 +108,8 @@ def main(argv):

source = [line.rstrip() for line in original_source]
source[0] = _removeBOM(source[0])
# filter all the tuples with empty space
source = list(filter(None, source))
Copy link
Member

Choose a reason for hiding this comment

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

I don't like this change, as it seems overly broad. For instance, if there are disabled sections, we don't want to remove the newlines from them.

Copy link
Author

Choose a reason for hiding this comment

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

ok, thanks! Yeah, makes sense to not format the disabled sections. I'll try to see if I can prevent the commented section from filtering.

Copy link
Author

Choose a reason for hiding this comment

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

@bwendling, I have added a util function that filters out the comment sections while removing the new lines. Kindly let me know for any feedback.

@EeyoreLee
Copy link
Contributor

Some blank line is uesd to make code more readable. It shouldn't be so decisive to remove all blank. This issue just wanna remove the black at the begining of a code block. Please at least add a knob if you have a plan to merge the feature that remove other blank lines.@bwendling

@Spitfire1900
Copy link
Contributor

Please add a new knob + appropriate tests

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@bwendlingbwendlingbwendling left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

No blank line after if/for/while/def, etc.
4 participants
@ashmichheda@EeyoreLee@Spitfire1900@bwendling

[8]ページ先頭

©2009-2025 Movatter.jp